This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel Panic when using external UART controller TL16C2752

Other Parts Discussed in Thread: TL16C2752

Hi,

We have a custom Davinci 6446 board on which an external UART controller TL16C2752 is interfaced (memory mapped) to the SOC using the EMIF interface.

In the platform file ./arch/arm/mach-davinci/board-evm.c we have added the below serial resource information:

static struct plat_serial8250_port serial_platform_data[2] = {
        {

                // Internal On-chip UART.
                .membase        = (char *)IO_ADDRESS(DAVINCI_UART0_BASE),
                .mapbase        = (unsigned long)DAVINCI_UART0_BASE,
                .irq            = IRQ_UARTINT0,
                .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
                .iotype         = UPIO_MEM32,
                .regshift       = 2,
                .uartclk        = DAVINCI_UART_CLK,
        },
        {

#define DAVINCI_UART0_EXTERNAL_BASE 0x08000000

                 // external tl16c2752 uart controller.
                .membase      = (char *)IO_ADDRESS(DAVINCI_UART0_EXTERNAL_BASE),
                .mapbase      = (unsigned long)DAVINCI_UART0_EXTERNAL_BASE,
                .irq            = IRQ_GPIO6,
                .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
                .iotype         = UPIO_MEM,
                .regshift       = 0,
                .uartclk        = 8000000,
 
        },
};

With this configuration I build the kernel image and when I boot the kernel panics for with error message

"Unable to handle kernel paging request at virtual address e7400001"

Below is the kernel boot log dump:-

#########################################################################################################

## Booting image at 80700000 ...
   Image Name:   Linux-2.6.10_mvl401-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1514668 Bytes =  1.4 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Linux version 2.6.10_mvl401-davinci_evm-PSP_01_30_00_082 (siva@a2md05879.mindtree.com) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #443 Mon Jul 26 11:57:53 IST 2010
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Machine: DaVinci Telemedicine
Memory policy: ECC disabled, Data cache writeback
DM6443a
PIN MUX1 value is 81
configured UART controller
Built 1 zonelists
Kernel command line: console=ttyS0,115200n8 noinitrd rw root=/dev/mmcblk0p1 rootfstype=ext3,nolock mem=120M ip=off video=davincifb:osd0=720x480x16,1350K:osd1=720x480,1350K:vid0=720x480,2025K:vid1=720x480,2025K davinci_enc_mngr.ch0_output=LCD1 davinci_enc_mngr.ch0_mode=800x480
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 120MB = 120MB total
Memory: 118144KB available (2589K code, 535K data, 292K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
desched thread 0 started up.
NET: Registered protocol family 16
DaVinci: 71 gpio irqs
Registering platform device 'serial8250.0'. Parent at platform
Registering platform device 'musb_hdrc'. Parent at platform
Registering platform device 'mmc.0'. Parent at platform
DaVinci I2C DEBUG: 17:04:58 Jul 22 2010
Registering platform device 'i2c'. Parent at platform
ch0 default output "LCD1", mode "800x480"
MUX: initialized LOEEN
VPBE Encoder Initialized
attaching client with addr 38
i2c_adapter i2c-0: TLM-T700 encoder initialized
read val FF
MUX: initialized RGB666
TLM-TL700 encoder initialized
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
musb_hdrc: version 2.2a/db-0.4.8 [cppi-dma] [host] [debug=0]
musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
musb_hdrc: MHDRC RTL version 1.300
musb_hdrc: USB Host mode controller at c8002000 using DMA, IRQ 12
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
MUX: initialized MCBSP0
MUX: initialized UART1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Registering platform device 'davincifb.0'. Parent at platform
Console: switching to colour frame buffer device 90x30
davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 1350KB
davincifb davincifb.0: dm_vid0_fb: 720x480x16@0,0 with framebuffer size 2025KB
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 1350KB
davincifb davincifb.0: dm_vid1_fb: 720x480x16@0,0 with framebuffer size 2025KB
usb 1-1: new high speed USB device using musb_hdrc and address 2
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
watchdog: TI DaVinci Watchdog Timer: timer margin 64 sec
Registering platform device 'davinci_resizer.2'. Parent at platform
Registering platform device 'davinci_telemedicin'. Parent at platform
Davinci Telemed LED device initilized successfully
Telemed RTC Init
Registering platform device 'davinci_previewer.2'. Parent at platform
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
Registering platform device 'serial8250'. Parent at platform
ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
Unable to handle kernel paging request at virtual address e7400001

pgd = c0004000
[e7400001] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0
PC is at serial_in+0x68/0x84
LR is at serial8250_config_port+0xbc/0xb7c
pc : [<c017b948>]    lr : [<c017d3b0>]    Not tainted
sp : c04afdd8  ip : 00000002  fp : c04afde4
r10: c04ae000  r9 : c02dea18  r8 : 00000000
r7 : c0356034  r6 : c0356034  r5 : c0602f48  r4 : 00000000
r3 : e7400000  r2 : 20000013  r1 : 00000001  r0 : c0356034
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  Segment kernel
Control: 5317F  Table: 80004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc04ae1a0)
Stack: (0xc04afdd8 to 0xc04b0000)
fdc0:                                                       c04afe2c c04afde8
fde0: c017d3b0 c017b8f0 c02eeb2c 20000013 c04afe14 c04afe00 fffffffe 00000001
fe00: c71d6d54 c02ee8b8 c0602f48 c0356034 c0602f48 00000000 c02dea18 c0356034
fe20: c04afe4c c04afe30 c017af98 c017d304 c0356034 c0602f48 c02ee8b8 c02ee7b0
fe40: c04afe74 c04afe50 c017b424 c017af3c c017b528 007a1200 00000000 00000000
fe60: 00000002 08000000 c04afeac c04afe78 c017e4f4 c017b380 c00784b0 c04afeb4
fe80: 00000000 c02deae4 c02dea18 c04afeb8 c02ee930 00000000 00000000 00000000
fea0: c04aff54 c04afeb0 c017e5f4 c017e434 00000000 00000000 00000000 e7400000
fec0: 00000036 007a1200 02000000 00000000 00000000 00000000 00000000 00000000
fee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ff00: 00000000 00000000 00000000 10000040 00000000 00000000 00000000 00000000
ff20: 00000000 00000000 08000000 c02dea18 00000000 c02eec10 c04aff54 c02ee930
ff40: c02dea18 c02eecb8 c04aff6c c04aff58 c017fb20 c017e55c c02dea20 c02ee930
ff60: c04aff8c c04aff70 c017fc3c c017fadc c01404dc c02eec5c ffffffff c02eec10
ff80: c04affb4 c04aff90 c017ff48 c017fbf4 c03560f0 ffffffff c715a3a8 c03560f0
ffa0: 00000000 00000000 c04affd4 c04affb8 c0022d20 c017fed4 c002b84c c04ae000
ffc0: 00000000 c002b91c c04afff4 c04affd8 c0051298 c0022c84 00000000 00000000
ffe0: 00000000 00000000 00000000 c04afff8 c00692a0 c0051214 3d0665f6 f6662f64
Backtrace:
[<c017b8e0>] (serial_in+0x0/0x84) from [<c017d3b0>] (serial8250_config_port+0xbc/0xb7c)
[<c017d2f4>] (serial8250_config_port+0x0/0xb7c) from [<c017af98>] (uart_configure_port+0x6c/0x198)
[<c017af2c>] (uart_configure_port+0x0/0x198) from [<c017b424>] (uart_add_one_port+0xb4/0x11c)
 r7 = C02EE7B0  r6 = C02EE8B8  r5 = C0602F48  r4 = C0356034
[<c017b370>] (uart_add_one_port+0x0/0x11c) from [<c017e4f4>] (uart_8250_register_port+0xd0/0x128)
 r8 = 08000000  r7 = 00000002  r6 = 00000000  r5 = 00000000
 r4 = 007A1200
[<c017e424>] (uart_8250_register_port+0x0/0x128) from [<c017e5f4>] (serial8250_probe+0xa8/0xcc)
[<c017e54c>] (serial8250_probe+0x0/0xcc) from [<c017fb20>] (driver_probe_device+0x54/0x74)
 r6 = C02EECB8  r5 = C02DEA18  r4 = C02EE930
[<c017facc>] (driver_probe_device+0x0/0x74) from [<c017fc3c>] (driver_attach+0x58/0x94)
 r5 = C02EE930  r4 = C02DEA20
[<c017fbe4>] (driver_attach+0x0/0x94) from [<c017ff48>] (bus_add_driver+0x84/0x12c)
 r6 = C02EEC10  r5 = FFFFFFFF  r4 = C02EEC5C
[<c017fec4>] (bus_add_driver+0x0/0x12c) from [<c0022d20>] (serial8250_init+0xac/0xf4)
[<c0022c74>] (serial8250_init+0x0/0xf4) from [<c0051298>] (init+0x94/0x1e0)
 r7 = C002B91C  r6 = 00000000  r5 = C04AE000  r4 = C002B84C
[<c0051204>] (init+0x0/0x1e0) from [<c00692a0>] (do_exit+0x0/0xda0)
 r7 = 00000000  r6 = 00000000  r5 = 00000000  r4 = 00000000
Code: e5903000 e5d33001 ea000001 e5903004 (e7d33001)
 <0>Kernel panic - not syncing: Attempted to kill init!

#########################################################################################################

Please let me know if I am doing some thing wrong with configuration.

Regards,

Hemanth.V