nualps 发表于 2012-11-21 17:28:46

at91sam9260 用st16c554芯片扩展串口问题

大家好!
我现用at91sam9260在linux2.6.30下用EBI方式连接st16c554芯片扩展4个串口。
我根据http://www.amobbs.com/forum.php?mod=viewthread&tid=4104237&highlight=554的程序进行修改保存为我的8025_at91_st16c554.c,对8025.c文件不做修改,
在make menuconfig 开启对16550的支持。后进行编译加载到板子上,系统启动后内核出错。我不编译8025_at91_st16c554.c文件,系统启动后还是会内核出错。当在make menuconfig取消了对
8250/16550该项的支持,则系统启动后一切正常。希望各位大侠能指点下小弟!谢谢!!!

make meuconfig 串口8250/16550部分配置信息:
   │ │    <*> 8250/16550 and compatible serial support                     │ │
   │ │    [ ]   Console on 8250/16550 and compatible serial port         │ │
   │ │    (4) Maximum number of 8250/16550 serial ports                  │ │
   │ │    (4) Number of 8250/16550 serial ports to register at runtime   │ │
   │ │    [ ] Extended 8250/16550 serial driver options                  │ │
   │ │      *** Non-8250 serial port support ***   


系统启动信息:
U-Boot 1.3.4 Yxx_QY(Nov5 2012 - 10:27:42)

DRAM:64 MB
NAND:128 MiB
DataFlash:AT45DB161
Nb pages:   4096
Page Size:    528
Size= 2162688 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D0003FFF (RO) Bootstrap
Area 1: D0004000 to D0007FFF      Environment
Area 2: D0008000 to D0037FFF (RO) U-Boot
In:    serial
Out:   serial
Err:   serial
Net:   QY macb0
MII_PHYSID1:0x181
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Hit any key to stop autoboot:0

NAND read: device 0 offset 0x400000, size 0x200000
2097152 bytes read: OK
## Booting kernel from Legacy Image at 22200000 ...
    Image Name:   Linux-2.6.30
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    1644560 Bytes =1.6 MB
    Load Address: 20008000
    Entry Point:20008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux......................................................................................................... done, booting the kernel.
Linux version 2.6.30 (yaobr@QY-SVN) (gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #83 Wed Nov 21 16:45:13 CST 2012
CPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: QY AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on.Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=192.168.1.126:192.168.1.82:192.168.1.1:255.255.255.0:::eth0:off
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61504KB available (2896K code, 243K data, 120K init, 0K highmem)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after software reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)漏 2001-2006 Red Hat, Inc.
msgmni has been set to 120
io scheduler noop registered
io scheduler anticipatory registered (default)
AT91 GPIO module init ...
AT91 BZR module init......
atmel_tcb module init
at91_tc.tc_base = 0xc4866000
at91_tc.tc_base = 0xc486a040
at91_tc.tc_base = 0xc486e080
at91_adc has been probed............................
at91adc: Loaded module
Analog-to-Digital Converter
Serial: 8250/16550 driver, 20 ports, IRQ sharing disabled
brd: module loaded
ssc ssc.0: Atmel SSC device at 0xc4880000 (irq 14)
Driver 'sd' needs updating - please use bus_type methods
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (12:34:56:78:90:00)
eth0: attached PHY driver (mii_bus:phy_addr=ffffffff:00, irq=-1)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 68 at 0x000000880000
Bad eraseblock 94 at 0x000000bc0000
Creating 3 MTD partitions on "atmel_nand":
0x000000000000-0x000000400000 : "Bootloader"
0x000000400000-0x000008000000 : "Kernel"
0x000000800000-0x000008000000 : "jffs2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
atmel_spi atmel_spi.1: Atmel SPI Controller at 0xfffcc000 (irq 13)
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
at91_udc: probe of at91_udc failed with error -16
mice: PS/2 mouse device common for all mice
at91_ds1337 init......
i2c /dev entries driver
i2c-adapter i2c-0: Can't create device at 0x00
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.20.
at73c213 spi1.0: at73c213: supported bitrate is 24250 (128 divider)
ALSA device list:
   #0: AT91SAM9260-EK external DAC on irq 14 QY
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
atmel_mci atmel_mci: Atmel MCI controller at 0xfffa8000 irq 9, 1 slots
IP-Config: Complete:
      device=eth0, addr=192.168.1.126, mask=255.255.255.0, gw=192.168.1.1,
      host=192.168.1.126, domain=, nis-domain=(none),
      bootserver=192.168.1.82, rootserver=192.168.1.82, rootpath=
eth0: link up (100/Full)
VFS: Mounted root (jffs2 filesystem) on device 31:2.
Freeing init memory: 120K
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
*pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0    Not tainted(2.6.30 #83)
PC is at tty_open+0x178/0x3d8
LR is at tty_open+0xec/0x3d8
pc : [<c012abd4>]    lr : [<c012ab48>]    psr: 60000013
sp : c3817e78ip : c3a0648cfp : c3816000
r10: 00000001r9 : 00500001r8 : c38d0f60
r7 : 00000000r6 : 00000000r5 : c0344320r4 : c39a0b00
r3 : 00000000r2 : 00000000r1 : c3817e84r0 : c39a0b04
Flags: nZCvIRQs onFIQs onMode SVC_32ISA ARMSegment kernel
Control: 0005317fTable: 20004000DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc3816268)
Stack: (0xc3817e78 to 0xc3818000)
7e60:                                                       c3408af0 00000002
7e80: 00000001 00000000 00000007 00000000 c0344320 c3408af0 00000000 c38d0f60
7ea0: 00000000 c3405938 00000026 c00865e4 00000000 00000000 c38d0f60 c3408af0
7ec0: c00864ac 00000000 c380a2a0 c0082098 00000006 c38d0f60 c3814660 c3817f30
7ee0: ffffff9c 00000003 c38bb000 c0083094 00000000 c3814660 c3817f30 00000000
7f00: c3817f30 c008e374 00000000 c0331bb1 c3817fac 36b4a597 00000000 00000002
7f20: 0000001d c003e4f8 00000000 20000013 c380a2a0 c3405938 c38bb000 00000001
7f40: c38bb000 00000101 00000001 00000000 ffffff9c 00000003 00000000 c0350280
7f60: 00000001 c00683c8 c380a2a0 00000001 c0330aa0 00000003 00000000 c38d0f60
7f80: c3815bc0 00000000 ffffff9c c3815bc8 00000000 00000002 00000000 ffffff9c
7fa0: 00000000 c38bb000 00000000 00000000 00000000 c0081e9c 00000000 c03313c0
7fc0: c00212e0 c03313c0 c00212e0 00000000 00000000 00000000 00000000 c002641c
7fe0: c03313c0 c00088ac 00000000 00000000 00000000 c00402a8 0f0f0f0f 0f0f0f0f
[<c012abd4>] (tty_open+0x178/0x3d8) from [<c00865e4>] (chrdev_open+0x138/0x158)
[<c00865e4>] (chrdev_open+0x138/0x158) from [<c0082098>] (__dentry_open+0x144/0x264)
[<c0082098>] (__dentry_open+0x144/0x264) from [<c0083094>] (nameidata_to_filp+0x44/0x5c)
[<c0083094>] (nameidata_to_filp+0x44/0x5c) from [<c008e374>] (do_filp_open+0x3c4/0x764)
[<c008e374>] (do_filp_open+0x3c4/0x764) from [<c0081e9c>] (do_sys_open+0x5c/0xe8)
[<c0081e9c>] (do_sys_open+0x5c/0xe8) from [<c002641c>] (init_post+0x28/0xec)
[<c002641c>] (init_post+0x28/0xec) from [<c00088ac>] (kernel_init+0xb0/0xd8)
[<c00088ac>] (kernel_init+0xb0/0xd8) from [<c00402a8>] (do_exit+0x0/0x598)
[<c00402a8>] (do_exit+0x0/0x598) from [<00000003>] (0x3)
Code: e3560000 1a00000f e59430b0 e59d200c (e5933000)
---[ end trace ba8ebbb27b0d9f0e ]---
Kernel panic - not syncing: Attempted to kill init!
[<c002c2d0>] (unwind_backtrace+0x0/0xdc) from [<c003d8d0>] (panic+0x44/0x114)
[<c003d8d0>] (panic+0x44/0x114) from [<c0040304>] (do_exit+0x5c/0x598)
[<c0040304>] (do_exit+0x5c/0x598) from [<c002a8b4>] (die+0x138/0x158)
[<c002a8b4>] (die+0x138/0x158) from [<c002d4b8>] (__do_kernel_fault+0x68/0x80)
[<c002d4b8>] (__do_kernel_fault+0x68/0x80) from [<c002d6d8>] (do_page_fault+0x208/0x228)
[<c002d6d8>] (do_page_fault+0x208/0x228) from [<c00261fc>] (do_DataAbort+0x34/0x98)
[<c00261fc>] (do_DataAbort+0x34/0x98) from [<c002692c>] (__dabt_svc+0x4c/0x60)
Exception stack(0xc3817e30 to 0xc3817e78)
7e20:                                     c39a0b04 c3817e84 00000000 00000000
7e40: c39a0b00 c0344320 00000000 00000000 c38d0f60 00500001 00000001 c3816000
7e60: c3a0648c c3817e78 c012ab48 c012abd4 60000013 ffffffff                  
[<c002692c>] (__dabt_svc+0x4c/0x60) from [<c012ab48>] (tty_open+0xec/0x3d8)
[<c012ab48>] (tty_open+0xec/0x3d8) from [<c00865e4>] (chrdev_open+0x138/0x158)
[<c00865e4>] (chrdev_open+0x138/0x158) from [<c0082098>] (__dentry_open+0x144/0x264)
[<c0082098>] (__dentry_open+0x144/0x264) from [<c0083094>] (nameidata_to_filp+0x44/0x5c)
[<c0083094>] (nameidata_to_filp+0x44/0x5c) from [<c008e374>] (do_filp_open+0x3c4/0x764)
[<c008e374>] (do_filp_open+0x3c4/0x764) from [<c0081e9c>] (do_sys_open+0x5c/0xe8)
[<c0081e9c>] (do_sys_open+0x5c/0xe8) from [<c002641c>] (init_post+0x28/0xec)
[<c002641c>] (init_post+0x28/0xec) from [<c00088ac>] (kernel_init+0xb0/0xd8)
[<c00088ac>] (kernel_init+0xb0/0xd8) from [<c00402a8>] (do_exit+0x0/0x598)
[<c00402a8>] (do_exit+0x0/0x598) from [<00000003>] (0x3)

linucos 发表于 2012-11-21 17:53:05

帮你顶顶,这么辛苦!

Auir 发表于 2012-11-21 18:00:09

看到这种帖子,忍不住手痒,跟帖。ST16C554就可以省掉了。
楼主感兴趣,可以给 jackie.luo@ferry-semi.com发email。
目前仅有样片 和 核心板, 原厂正在测试中,测试完毕后,立即通知大家。

kevin_me 发表于 2012-11-21 18:11:20

串口怎么扩展啊?lz能讲讲么

nualps 发表于 2012-11-21 18:22:28

linucos 发表于 2012-11-21 17:53 static/image/common/back.gif
帮你顶顶,这么辛苦!

谢谢支持!

nualps 发表于 2012-11-21 18:23:51

Auir 发表于 2012-11-21 18:00 static/image/common/back.gif
看到这种帖子,忍不住手痒,跟帖。ST16C554就可以省掉了。
楼主感兴趣,可以给   发email。
目前仅有样片 ...

好的!谢谢支持!哈哈 看来您也在搞9260哈,祝您早日成功!~

nualps 发表于 2012-11-21 18:27:50

kevin_me 发表于 2012-11-21 18:11 static/image/common/back.gif
串口怎么扩展啊?lz能讲讲么

就是通过EBI方式,st16c554使用的是16模式,片选与高位4根地址线经一芯片输出4个片选信号,低位地址当地址线,其他就是控制线了。

nualps 发表于 2012-11-22 11:20:33

自顶,大神们,求指点!

aworker 发表于 2012-11-22 12:22:06

at91sam9260,还没有停产么?

nualps 发表于 2012-11-22 13:11:56

aworker 发表于 2012-11-22 12:22 static/image/common/back.gif
at91sam9260,还没有停产么?

还没有哈

error_dan 发表于 2012-11-22 13:21:28

3L说了这么久连个datasheet都没有...

li_thomas 发表于 2012-11-22 14:19:38

aworker 发表于 2012-11-22 12:22 static/image/common/back.gif
at91sam9260,还没有停产么?

当然没有,现在出货量很大,

nualps 发表于 2012-11-23 09:34:24

有兄弟能帮我给fishhead这位大神传个信不,我看他在http://www.amobbs.com/forum.php?mod=viewthread&tid=4104237&highlight=554帖子里也做了同样的事,而且貌似成功了,想请教下他,不过小弟的等级比较低,没法给他发信,麻烦各位大哥帮小弟一下,谢谢!!!!!!

nualps 发表于 2012-12-3 08:54:32

这个问题已解决,就此封贴,谢谢各位的回复!!!这个问题的原因是板子本身带了7个串口,该串口的设备文件和设备号与8250.c驱动中默认的都一样,造成冲突,所以只需要修改8250.c中的设备文件名与设备号即可。

xg123 发表于 2013-8-3 16:37:51

nualps 发表于 2012-12-3 08:54 static/image/common/back.gif
这个问题已解决,就此封贴,谢谢各位的回复!!!这个问题的原因是板子本身带了7个串口,该串口的设备文件 ...

请问使用16c554扩充串口的时候,单片机都需要配置那些东西?
页: [1]
查看完整版本: at91sam9260 用st16c554芯片扩展串口问题