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.

AM437X: UIO driver

Hi,

I  am trying to port UIO driver for  AM437X. I know that TI is not recommending this. Just i want check basic stubs through PRU. So i am doing this activity. I slightly modified uio driver loader library  by giving some inputs

#define AM43XX_PRU_MMAP_SIZE            0x40000
#define AM43XX_DATARAM0_PHYS_BASE       0x54400000
#define AM43XX_DATARAM1_PHYS_BASE       0x54402000
#define AM43XX_PRUSS_SHAREDRAM_BASE     0x54410000
#define AM43XX_INTC_PHYS_BASE           0x54420000
#define AM43XX_PRU0CONTROL_PHYS_BASE    0x54422000
#define AM43XX_PRU1CONTROL_PHYS_BASE    0x54424000
#define AM43XX_PRUSS_CFG_BASE           0x54426000
#define AM43XX_PRUSS_UART_BASE          0x54428000
#define AM43XX_PRUSS_IEP_BASE           0x5442E000
#define AM43XX_PRUSS_ECAP_BASE          0x54430000
#define AM43XX_PRUSS_EXT_BASE           0x54440000
#define AM43XX_PRUSS_OCP_HP_BASE        0x54480000
#define AM43XX_PRU0IRAM_PHYS_BASE       0x54434000
#define AM43XX_PRU1IRAM_PHYS_BASE       0x54438000
#define AM43XX_PRU0DEBUG_PHYS_BASE      0x54422400
#define AM43XX_PRU1DEBUG_PHYS_BASE      0x54424400

Everything goes fine. As soon as enable the PRU 0 control registers.  I am keep on getting following crash/warning messages from kernel. It is pointing ICSS0 instead of ICSS1

I/PRU_DRV_INTERFACE( 2267):  prussdrv_open
I/PRU_DRV_INTERFACE( 2267):  __prussdrv_memmap_init
I/PRU_DRV_INTERFACE( 2267):  Checking PRU Revision id...
I/PRU_DRV_INTERFACE( 2267):  value is 0x4e82a900
I/PRU_DRV_INTERFACE( 2267):  Revision id: 3
I/PRU_DRV_INTERFACE( 2267): AM437X
I/PRU_DRV_INTERFACE( 2267): File ./blinker.bin open passed
I/PRU_DRV_INTERFACE( 2267):  Writing firmware data into PRU ICSS ...
I/PRU_DRV_INTERFACE( 2267):  prussdrv_pru_write_memory ram id: 2
I/PRU_DRV_INTERFACE( 2267):  prussdrv_pru_enable enter
I/PRU_DRV_INTERFACE( 2267):  PRU Control register value 0x00000001
I/PRU_DRV_INTERFACE( 2267): After PRU enable 0x00000002
I/PRU_DRV_INTERFACE( 2267):  prussdrv_pru_enable exit
[   33.567739] ------------[ cut here ]------------
[   33.572702] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:137 l3_interrupt_handler+0x194/0x28c()
[   33.582617] L3 custom error: MASTER:ICSS0 TARGET:L4_PER 1
[   33.588365] Modules linked in: omaplfb(O) pvrsrvkm(O)
[   33.593770] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O 3.12.20-ga021885-dirty #24
[   33.602665] Backtrace:
[   33.605286] [<c00186e4>] (dump_backtrace+0x0/0x10c) from [<c0018880>] (show_stack+0x18/0x1c)
[   33.614274]  r6:00000000 r5:ffffffff r4:00000000 r3:00000000
[   33.620341] [<c0018868>] (show_stack+0x0/0x1c) from [<c06a0288>] (dump_stack+0x7c/0xbc)
[   33.628886] [<c06a020c>] (dump_stack+0x0/0xbc) from [<c004af00>] (warn_slowpath_common+0x6c/0x90)
[   33.638336]  r6:00000089 r5:00000009 r4:c0927e08 r3:00000000
[   33.644393] [<c004ae94>] (warn_slowpath_common+0x0/0x90) from [<c004afc8>] (warn_slowpath_fmt+0x38/0x)
[   33.654490]  r8:00000002 r7:00080003 r6:f1000200 r5:00000001 r4:c09863dc
[   33.661663] [<c004af90>] (warn_slowpath_fmt+0x0/0x40) from [<c02ca5f0>] (l3_interrupt_handler+0x194/0)
[   33.671945]  r3:c09861c4 r2:c082f478
[   33.675774] [<c02ca45c>] (l3_interrupt_handler+0x0/0x28c) from [<c0083f94>] (handle_irq_event_percpu+)
[   33.686618] [<c0083f40>] (handle_irq_event_percpu+0x0/0x19c) from [<c0084120>] (handle_irq_event+0x44)
[   33.697003] [<c00840dc>] (handle_irq_event+0x0/0x64) from [<c00871dc>] (handle_fasteoi_irq+0xa0/0x160)
[   33.706915]  r6:c0923f98 r5:ed006254 r4:ed006200 r3:00000000
[   33.712970] [<c008713c>] (handle_fasteoi_irq+0x0/0x160) from [<c0083904>] (generic_handle_irq+0x28/0x)
[   33.723067]  r5:c092ec08 r4:0000002a
[   33.726899] [<c00838dc>] (generic_handle_irq+0x0/0x38) from [<c00159b8>] (handle_IRQ+0x60/0xdc)
[   33.736163]  r4:0000002a r3:00000182
[   33.739985] [<c0015958>] (handle_IRQ+0x0/0xdc) from [<c000885c>] (gic_handle_irq+0x30/0x64)
[   33.748879]  r8:c09b99a4 r7:fa240100 r6:c0927f30 r5:c092ed70 r4:fa24010c
r3:00000100
[   33.757263] [<c000882c>] (gic_handle_irq+0x0/0x64) from [<c06a6600>] (__irq_svc+0x40/0x74)
[   33.766067] Exception stack(0xc0927f30 to 0xc0927f78)
[   33.771449] 7f20:                                     ffffffed 008f1000 c092f640 c00264a0
[   33.780162] 7f40: c0926000 00000000 c092e950 c06b1104 c09b99a4 c09b99a4 00000001 c0927f84
[   33.788874] 7f60: c0927f78 c0927f78 c0015d9c c0015d8c 60070013 ffffffff
[   33.795917]  r7:c0927f64 r6:ffffffff r5:60070013 r4:c0015d8c
[   33.801973] [<c0015d5c>] (arch_cpu_idle+0x0/0x4c) from [<c00835fc>] (cpu_startup_entry+0x68/0x158)
[   33.811525] [<c0083594>] (cpu_startup_entry+0x0/0x158) from [<c069a768>] (rest_init+0x78/0x90)
[   33.820696]  r7:c09080a0 r3:c0926000
[   33.824530] [<c069a6f0>] (rest_init+0x0/0x90) from [<c08c6af8>] (start_kernel+0x2b8/0x314)
[   33.833332]  r4:c092ea18 r3:00000000
[   33.837154] [<c08c6840>] (start_kernel+0x0/0x314) from [<80008074>] (0x80008074)
[   33.845031] ---[ end trace 6e5c04b7e722d4b8 ]---

Now what configurations i have to check.