Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: add EXAR ST16C554D driver to at91sam9261 on linux-2.6.30
PostPosted: Thu Aug 11, 2011 5:29 am 
Offline

Joined: Mon Jan 17, 2011 11:17 am
Posts: 13
Dear,
now I am planning to add 16c554 driver into linux-2.6.30 for 9261, can you please help to give me some instructions?
i don't know which mode is better, 16 mode and 68 mode.
Do I need write all driver by myself? Or I can use the current files in linux, and I just do little modification?

thanks!
BRs
demoxie


Top
 Profile  
 
 Post subject: Re: add EXAR ST16C554D driver to at91sam9261 on linux-2.6.30
PostPosted: Fri Aug 12, 2011 7:10 am 
Offline

Joined: Mon Jan 17, 2011 11:17 am
Posts: 13
I confined 8250_exar_st16c554.c into board-sam9162ek.c,
and changed from .iobase to .mapbase=(unsigned long) _base, .iotyep = UPIO_MEM32, .flags=(UPF_AUTO_CONFIG | UPF_IOREMAP).
and finally start kernel, some errors happen, where is wrong or something i lost.
here is the log file, when kernel start.

Starting kernel ...

Uncompressing Linux.................................................................................................................................... done, booting the kernel.
Linux version 2.6.30 (root@ubuntu) (gcc version 3.4.1) #39 Sat Jun 11 20:11:42 PDT 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9261-EK
Ignoring unrecognised tag 0x54410008
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: mem=64M console=tty0 root=/dev/nfs rw nfsroot=192.168.20.11:/home/nfs ip=192.168.20.22:192.168.20.11:192.168.20.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 [tty0] enabled
console [ttyS0] 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: 60664KB available (3800K code, 259K data, 140K 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 user 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
cfg80211: Calling CRDA to update world regulatory domain
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 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 600KiB frame buffer at 23a00000 (mapped at ffc00000)
Console: switching to colour frame buffer device 91x34
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c48b4000), irq 21
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc48c8000 (irq 15)
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000a at c48ce000,c48d2044 IRQ 107 MAC: 00:76:50:bc:16:9a (chip)
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 251 at 0x000001f60000
Bad eraseblock 364 at 0x000002d80000
Bad eraseblock 788 at 0x000006280000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000400000 : "Partition 1"
0x000000400000-0x000008000000 : "Partition 2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
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.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
i2c /dev entries driver
rtc-pcf8563 0-0051: chip found, driver version 0.4.3
rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
i2c-gpio i2c-gpio: using pins 39 (SDA) and 40 (SCL)
Registered led device: ds7
Registered led device: ds8
Registered led device: ds1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.20.
at73c213 spi0.3: at73c213: supported bitrate is 48500 (64 divider)
ALSA device list:
#0: AT91SAM9261-EK external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
rtc-pcf8563 0-0051: pcf8563_get_datetime: read error
rtc-pcf8563 0-0051: hctosys: unable to read the hardware clock
eth0: link down
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.20.22, mask=255.255.255.0, gw=192.168.20.1,
host=192.168.20.22, domain=, nis-domain=(none),
bootserver=192.168.20.11, rootserver=192.168.20.11, rootpath=
Looking up port of RPC 100003/2 on 192.168.20.11
Looking up port of RPC 100005/1 on 192.168.20.11
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 140K
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.30 #39)
PC is at tty_open+0x18c/0x400
LR is at tty_open+0xf4/0x400
pc : [<c018dbb8>] lr : [<c018db20>] psr: 60000013
sp : c3817e4c ip : c3817e4c fp : c3817e7c
r10: 00500001 r9 : c340ba2c r8 : 00000001
r7 : 00000000 r6 : c382a620 r5 : 00000000 r4 : c3ad8780
r3 : 00000000 r2 : 00000000 r1 : 0000002b r0 : c03ac970
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc3816260)
Stack: (0xc3817e4c to 0xc3818000)
7e40: 00000002 00000000 c0417724 c340ba2c fffffffa
7e60: 00000000 c382a620 00000003 00000000 c3817ea4 c3817e80 c008f714 c018da3c
7e80: 00000000 c382a620 c340ba2c c008f5d0 c380a2a0 c3406b54 c3817ecc c3817ea8
7ea0: c008b824 c008f5e0 c382a620 c3814660 00000000 c383d000 ffffff9c c383d000
7ec0: c3817eec c3817ed0 c008ba5c c008b6e0 00000000 c3814660 00000000 c3817f14
7ee0: c3817f8c c3817ef0 c00960f0 c008ba20 c3817ee4 c3817f08 00000000 00000000
7f00: 00000002 ffffffff 20000013 00000006 c0424320 c380a2a0 c3406b54 c3817f28
7f20: c006ff9c c006f874 00000101 00000001 00000000 ffffffff c0424500 c0409970
7f40: c3817f6c 00000000 00000000 c3815bc0 c3815bc8 00000000 00000003 00000000
7f60: c382a620 00000000 00000002 00000000 00000000 ffffff9c 00000000 c383d000
7f80: c3817fb8 c3817f90 c008bc28 c0095d3c 00000026 c040a1b8 c00241ac 00000000
7fa0: 00000000 00000000 00000000 c3817fc8 c3817fbc c008bcdc c008bbd0 c3817fdc
7fc0: c3817fcc c002b49c c008bcc8 c040a1b8 c3817ff4 c3817fe0 c0008a54 c002b47c
7fe0: 00000000 00000000 00000000 c3817ff8 c00438c4 c00089a8 00000000 00000000
Backtrace:
[<c018da2c>] (tty_open+0x0/0x400) from [<c008f714>] (chrdev_open+0x144/0x168)
[<c008f5d0>] (chrdev_open+0x0/0x168) from [<c008b824>] (__dentry_open+0x154/0x264)
r8:c3406b54 r7:c380a2a0 r6:c008f5d0 r5:c340ba2c r4:c382a620
[<c008b6d0>] (__dentry_open+0x0/0x264) from [<c008ba5c>] (nameidata_to_filp+0x4c/0x64)
[<c008ba10>] (nameidata_to_filp+0x0/0x64) from [<c00960f0>] (do_filp_open+0x3c4/0x748)
r5:c3817f14 r4:00000000
[<c0095d2c>] (do_filp_open+0x0/0x748) from [<c008bc28>] (do_sys_open+0x68/0xf8)
[<c008bbc0>] (do_sys_open+0x0/0xf8) from [<c008bcdc>] (sys_open+0x24/0x28)
[<c008bcb8>] (sys_open+0x0/0x28) from [<c002b49c>] (init_post+0x30/0x100)
[<c002b46c>] (init_post+0x0/0x100) from [<c0008a54>] (kernel_init+0xbc/0xe4)
r4:c040a1b8
[<c0008998>] (kernel_init+0x0/0xe4) from [<c00438c4>] (do_exit+0x0/0x588)
r5:00000000 r4:00000000
Code: e3550000 1a000011 e59430b0 e51b202c (e5933000)
---[ end trace 1db84f805b9f1bcd ]---
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c002f720>] (dump_backtrace+0x0/0x104) from [<c002f83c>] (dump_stack+0x18/0x1c)
r7:00000005 r6:c040a4fc r5:c3812c40 r4:c3816000
[<c002f824>] (dump_stack+0x0/0x1c) from [<c00413b8>] (panic+0x40/0x10c)
[<c0041378>] (panic+0x0/0x10c) from [<c0043adc>] (do_exit+0x218/0x588)
r3:c03e9e54 r2:c3812c40 r1:c3812c40 r0:c0393814
[<c00438c4>] (do_exit+0x0/0x588) from [<c002f990>] (die+0x134/0x154)
[<c002f85c>] (die+0x0/0x154) from [<c00310c0>] (__do_kernel_fault+0x6c/0x7c)
[<c0031054>] (__do_kernel_fault+0x0/0x7c) from [<c00313f0>] (do_page_fault+0x200/0x220)
r7:c3817e04 r6:00000005 r5:c3812c40 r4:ffffffff
[<c00311f0>] (do_page_fault+0x0/0x220) from [<c0031430>] (do_translation_fault+0x20/0x80)
[<c0031410>] (do_translation_fault+0x0/0x80) from [<c002b228>] (do_DataAbort+0x3c/0xa0)
r5:c03e60a8 r4:ffffffff
[<c002b1ec>] (do_DataAbort+0x0/0xa0) from [<c002b9e0>] (__dabt_svc+0x40/0x60)
Exception stack(0xc3817e04 to 0xc3817e4c)
7e00: c03ac970 0000002b 00000000 00000000 c3ad8780 00000000 c382a620
7e20: 00000000 00000001 c340ba2c 00500001 c3817e7c c3817e4c c3817e4c c018db20
7e40: c018dbb8 60000013 ffffffff
r8:00000001 r7:00000000 r6:c382a620 r5:c3817e38 r4:ffffffff
[<c018da2c>] (tty_open+0x0/0x400) from [<c008f714>] (chrdev_open+0x144/0x168)
[<c008f5d0>] (chrdev_open+0x0/0x168) from [<c008b824>] (__dentry_open+0x154/0x264)
r8:c3406b54 r7:c380a2a0 r6:c008f5d0 r5:c340ba2c r4:c382a620
[<c008b6d0>] (__dentry_open+0x0/0x264) from [<c008ba5c>] (nameidata_to_filp+0x4c/0x64)
[<c008ba10>] (nameidata_to_filp+0x0/0x64) from [<c00960f0>] (do_filp_open+0x3c4/0x748)
r5:c3817f14 r4:00000000
[<c0095d2c>] (do_filp_open+0x0/0x748) from [<c008bc28>] (do_sys_open+0x68/0xf8)
[<c008bbc0>] (do_sys_open+0x0/0xf8) from [<c008bcdc>] (sys_open+0x24/0x28)
[<c008bcb8>] (sys_open+0x0/0x28) from [<c002b49c>] (init_post+0x30/0x100)
[<c002b46c>] (init_post+0x0/0x100) from [<c0008a54>] (kernel_init+0xbc/0xe4)
r4:c040a1b8
[<c0008998>] (kernel_init+0x0/0xe4) from [<c00438c4>] (do_exit+0x0/0x588)
r5:00000000 r4:00000000


Top
 Profile  
 
 Post subject: Re: add EXAR ST16C554D driver to at91sam9261 on linux-2.6.30
PostPosted: Mon Aug 15, 2011 3:34 am 
Offline

Joined: Mon Jan 17, 2011 11:17 am
Posts: 13
here is my edition for 16c554, please help to check where is wrong.
#define PORT(_base,_irq) \
{ \
.mapbase = (resource_size_t)_base, \
.irq = (unsigned int)_irq, \
.uartclk = 1843200, \
.iotype = UPIO_MEM32, \
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
.regshift = 0, \
}

static struct plat_serial8250_port exar_data[] = {
PORT(AT91_CHIPSELECT_0+0x100, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x108, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x110, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x118, AT91_PIN_PB30),
{ },
};


Top
 Profile  
 
 Post subject: Re: add EXAR ST16C554D driver to at91sam9261 on linux-2.6.30
PostPosted: Mon Aug 15, 2011 3:34 am 
Offline

Joined: Mon Jan 17, 2011 11:17 am
Posts: 13
here is my edition for 16c554, please help to check where is wrong.
#define PORT(_base,_irq) \
{ \
.mapbase = (resource_size_t)_base, \
.irq = (unsigned int)_irq, \
.uartclk = 1843200, \
.iotype = UPIO_MEM32, \
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
.regshift = 0, \
}

static struct plat_serial8250_port exar_data[] = {
PORT(AT91_CHIPSELECT_0+0x100, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x108, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x110, AT91_PIN_PB30),
PORT(AT91_CHIPSELECT_0+0x118, AT91_PIN_PB30),
{ },
};


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: