UART0,2,3,4,5

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART0,2,3,4,5

Jump to solution
1,044 Views
Nouchi
Senior Contributor II

Hello,

With linux system, how to enable other UARTs for applications (not for system console)?

Best regards,

Emmanuel

Edit :

I found a partial answer here : Re: Vybrid UART's from Linux

It works fine for UART0 to UART3

[ 0.292014] Serial: MVF driver
[ 0.292181] IMX UART EDMA enabled
[ 0.292199] IMX UART FIFO enabled
[ 0.292237] imx-uart.0: ttymxc0 at MMIO 0x40027000 (irq = 93) is a IMX
[ 0.292879] IMX UART EDMA enabled
[ 0.292899] IMX UART FIFO enabled
[ 0.292931] imx-uart.1: ttymxc1 at MMIO 0x40028000 (irq = 94) is a IMX
[ 0.305430] console [ttymxc1] enabled
[ 0.309808] IMX UART EDMA enabled
[ 0.313166] IMX UART FIFO enabled
[ 0.316513] imx-uart.3: ttymxc3 at MMIO 0x4002a000 (irq = 96) is a IMX

, but crash kernel (panic) at boot time.

[ 0.323728] IMX UART RTS/CTS enabled
[ 0.327314] IMX UART FIFO enabled
[ 0.330690] imx-uart.5: ttymxc5 at MMIO 0x400ab000 (irq = 98) is a IMX
[ 0.337240] Unhandled fault: external abort on non-linefetch (0x1008) at 0x8883600d
[ 0.334915] Internal error: : 1008 [#1]
[ 0.338759] Modules linked in:
[ 0.331845] CPU: 0 Not tainted  (3.0.15-ts-armv7l #119)
[ 0.337361] PC is at imx_set_mctrl+0x14/0x5c
[ 0.331653] LR is at uart_add_one_port+0x298/0x3b8
[ 0.336465] pc : [<802785d4>] lr : [<80275f9c>] psr: 60000093
[ 0.336480] sp : 8602dda8  ip : 8602ddc0  fp : 8602ddbc
[ 0.337968] r10: 860c0120  r9 : 80464860  r8 : 60000013
[ 0.333209] r7 : 8618aac4  r6 : 863fd200  r5 : 863fd200  r4 : 804b8a94
[ 0.339750] r3 : 88836000  r2 : ffffffff  r1 : 00000000  r0 : 863fd200
[ 0.336292] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[ 0.333707] Control: 10c53c7d  Table: 80004059  DAC: 00000015
[ 0.339466] Process swapper (pid: 1, stack limit = 0x8602c2e8)
[ 0.335312] Stack: (0x8602dda8 to 0x8602e000)
[ 0.339696] dda0:               804b8a94 8618aa94 8602de4c 8602ddc0 80275f9c 802785cc
[ 0.337903] ddc0: 00000005 8602dde0 00000062 80463364 5d343133 00000062 00000005 80463374
[ 0.336109] dde0: 4f494d4d 34783020 62613030 00303030 00000000 00000000 00000000 863fd200
[ 0.334315] de00: 860bfe00 804a44d0 860c00e0 860bfe08 00000000 8001a26c 8602de3c 8602de28
[ 0.332520] de20: 803ad504 863fd200 860bfe00 804a44d0 860c00e0 860bfe08 00000000 8001a26c
[ 0.330727] de40: 8602de74 8602de50 80279504 80275d10 802793c8 860bfe08 804e0c98 860bfe3c
[ 0.338932] de60: 804b8b2c 00000000 8602de84 8602de78 802817dc 802793d4 8602dea4 8602de88
[ 0.337138] de80: 802803fc 802817c8 860bfe08 804b8b2c 860bfe3c 860dec60 8602dec4 8602dea8
[ 0.335344] dea0: 802805a8 80280374 80280514 00000000 804b8b2c 80280514 8602deec 8602dec8
[ 0.333550] dec0: 8027f30c 80280520 860230f8 86052db0 80231bc0 804b8b2c 804b8b2c 804b9030
[ 0.331756] dee0: 8602defc 8602def0 802800c0 8027f2cc 8602df2c 8602df00 8027fd60 802800a8
[ 0.339961] df00: 80446b18 8602df10 804b8b2c 80023404 804c6380 8602c000 00000000 8001a26c
[ 0.338167] df20: 8602df54 8602df30 80280aa0 8027fbec 00000000 80023404 804c6380 8602c000
[ 0.336373] df40: 00000000 8001a26c 8602df64 8602df58 80281bd8 80280a2c 8602df7c 8602df68
[ 0.334579] df60: 8001a298 80281b98 00000000 8002331c 8602dfd4 8602df80 8008d464 8001a278
[ 0.332784] df80: 800db034 801543f0 0000019f 00000000 8602dfb4 31342580 00000035 00000000
[ 0.330990] dfa0: 8602dfbc 000001b0 804b11b4 8002331c 80023404 800aa3d4 00000013 00000000
[ 0.339195] dfc0: 00000000 00000000 8602dff4 8602dfd8 800089d0 8008d348 00000000 00000000
[ 0.337402] dfe0: 00000000 80008950 00000000 8602dff8 800aa3d4 8000895c 71577773 df7d3373
[ 0.335587] Backtrace:
[ 0.338083] [<802785c0>] (imx_set_mctrl+0x0/0x5c) from [<80275f9c>] (uart_add_one_port+0x298/0x3b8)
[ 0.337147]  r5:8618aa94 r4:804b8a94
[ 0.330779] [<80275d04>] (uart_add_one_port+0x0/0x3b8) from [<80279504>] (serial_imx_probe+0x13c/0x244)
[ 0.330216] [<802793c8>] (serial_imx_probe+0x0/0x244) from [<802817dc>] (platform_drv_probe+0x20/0x24)
[ 0.339532]  r8:00000000 r7:804b8b2c r6:860bfe3c r5:804e0c98 r4:860bfe08
[ 0.336133] r3:802793c8
[ 0.338807] [<802817bc>] (platform_drv_probe+0x0/0x24) from [<802803fc>] (driver_probe_device+0x94/0x1ac)
[ 0.338414] [<80280368>] (driver_probe_device+0x0/0x1ac) from [<802805a8>] (__driver_attach+0x94/0x98)
[ 0.337733]  r7:860dec60 r6:860bfe3c r5:804b8b2c r4:860bfe08
[ 0.333481] [<80280514>] (__driver_attach+0x0/0x98) from [<8027f30c>] (bus_for_each_dev+0x4c/0x94)
[ 0.332453]  r6:80280514 r5:804b8b2c r4:00000000 r3:80280514
[ 0.338200] [<8027f2c0>] (bus_for_each_dev+0x0/0x94) from [<802800c0>] (driver_attach+0x24/0x28)
[ 0.336999]  r6:804b9030 r5:804b8b2c r4:804b8b2c
[ 0.331689] [<8028009c>] (driver_attach+0x0/0x28) from [<8027fd60>] (bus_add_driver+0x180/0x250)
[ 0.330512] [<8027fbe0>] (bus_add_driver+0x0/0x250) from [<80280aa0>] (driver_register+0x80/0x144)
[ 0.339509] [<80280a20>] (driver_register+0x0/0x144) from [<80281bd8>] (platform_driver_register+0x4c/0x60)
[ 0.339304] [<80281b8c>] (platform_driver_register+0x0/0x60) from [<8001a298>] (imx_serial_init+0x2c/0x50)
[ 0.339001] [<8001a26c>] (imx_serial_init+0x0/0x50) from [<8008d464>] (do_one_initcall+0x128/0x1a8)
[ 0.338065]  r4:8002331c r3:00000000
[ 0.331693] [<8008d33c>] (do_one_initcall+0x0/0x1a8) from [<800089d0>] (kernel_init+0x80/0x11c)
[ 0.330433] [<80008950>] (kernel_init+0x0/0x11c) from [<800aa3d4>] (do_exit+0x0/0x608)
[ 0.338362]  r5:80008950 r4:00000000
[ 0.331984] Code: e92dd830 e24cb004 e5903004 e1a05000 (e5d3400d)
[ 0.348157] ---[ end trace 65f8ea860415c04f ]---
[ 0.352817] Kernel panic - not syncing: Attempted to kill init!

I tried to disable DMA and FIFO on uart5 without success.

Does anybody have an idea?

Labels (5)
0 Kudos
Reply
1 Solution
635 Views
Nouchi
Senior Contributor II

Hello,

In mach/mvf.h uart5 definition need to be corrected.

#define MVF_UART5_BASE_ADDR    (MVF_AIPS1_BASE_ADDR - 0x80000 + 0x000AA000)

Tanks,

Emmanuel

View solution in original post

0 Kudos
Reply
1 Reply
636 Views
Nouchi
Senior Contributor II

Hello,

In mach/mvf.h uart5 definition need to be corrected.

#define MVF_UART5_BASE_ADDR    (MVF_AIPS1_BASE_ADDR - 0x80000 + 0x000AA000)

Tanks,

Emmanuel

0 Kudos
Reply