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.

Linux/AM5728: GPIO register access error

Part Number: AM5728


Tool/software: Linux

On our custom board, we want to use GPIO3 as output io. the insmod modules is failed when we  configure the GPIO_OE register in modules.

the message is:

[ 1356.253828] en phyaddr is:0x48057134 viraddr is:0xfa057134                                                                  
[ 1356.260474] Unhandled fault: asynchronous external abort (0x1211) at 0x00000000                                                           
[ 1356.260477] pgd = ed35d7c0                                                                                                                
[ 1356.260483] [00000000] *pgd=acf2c003, *pmd=fe37f003                                                                                       
[ 1356.260489] Internal error: : 1211 [#1] PREEMPT SMP ARM                                                                                   
[ 1356.260568] Modules linked in: ubt_sci(O+) xhci_plat_hcd xhci_hcd usbcore xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 bluetooth af)
[ 1356.260575] CPU: 1 PID: 1136 Comm: insmod Tainted: G        W  O    4.4.41-rt50-g968d071ce9 #9                                            
[ 1356.260578] Hardware name: Generic DRA74X (Flattened Device Tree)                                                                         
[ 1356.260581] task: ed25ba00 ti: ecdae000 task.ti: ecdae000      

when we use 'devmem2' to read  GPIO_OE '0x48057134', the linux print message as:

root@am57xx-evm:/mnt# devmem2 0x48057134                                                                                         
/dev/mem opened.                                                                                                                             
Memory mapped at address 0xb6f02000.[ 1783.180811] Unhandled fault: asynchronous external abort (0x1211) at 0x00000000                       
[ 1783.180814] pgd = ed358980                                                                                                                
[ 1783.180817] ------------[ cut here ]------------                                                                                          
[ 1783.180828] [00000000] *pgd=ad1ec003, *pmd=fe04b003                                                                                       
                                                                                                                                             
[ 1783.204974] WARNING: CPU: 1 PID: 28 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x36c()                                   
[ 1783.214579] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Read): Data Access in User mode during Functional access          
[ 1783.226202] Modules linked in:Bus error (core dumped) ubt_sci(O+) xhci_plat_hcd xhci_hcd usbcore xfrm_user xfrm4_tunnel ipcomp xfrm_ipcom)
                                                                                                                                             
[ 1783.282665] CPU: 1 PID: 28 Comm: irq/23-l3-app-i Tainted: G      D W  O    4.4.41-rt50-g968d071ce9 #9                                     
[ 1783.282668] Hardware name: Generic DRA74X (Flattened Device Tree)                                                                         
[ 1783.282672] Backtrace:                                                                                                                    
[ 1783.282688] [<c0013100>] (dump_backtrace) from [<c00132fc>] (show_stack+0x18/0x1c)                                                        
[ 1783.282698]  r7:c02e7a0c r6:20080013 r5:00000000 r4:c093e2b4                                                                              
[ 1783.282708] [<c00132e4>] (show_stack) from [<c02bb384>] (dump_stack+0x8c/0xa0)                                                            
[ 1783.282718] [<c02bb2f8>] (dump_stack) from [<c0034794>] (warn_slowpath_common+0x88/0xb8)                                                  
[ 1783.282725]  r7:c02e7a0c r6:00000093 r5:00000009 r4:ee651e28                                                                              
[ 1783.282735] [<c003470c>] (warn_slowpath_common) from [<c00347fc>] (warn_slowpath_fmt+0x38/0x40)                                           
[ 1783.282743]  r8:ee62e510 r7:c0828920 r6:00000002 r5:c08289e0 r4:c0828a84                                                                  
[ 1783.282751] [<c00347c8>] (warn_slowpath_fmt) from [<c02e7a0c>] (l3_interrupt_handler+0x25c/0x36c)                                         
[ 1783.282755]  r3:ee62e380 r2:c0828a84                                                                                                      
[ 1783.282758]  r4:80080003                                                                                                                  
[ 1783.282767] [<c02e77b0>] (l3_interrupt_handler) from [<c00839d4>] (irq_forced_thread_fn+0x28/0x7c)                                        
[ 1783.282777]  r10:c00839ac r9:ee62e8c0 r8:ee601900 r7:00000001 r6:00000000 r5:ee601900                                                     
[ 1783.282779]  r4:ee62e8c0                                                                                                                  
[ 1783.282788] [<c00839ac>] (irq_forced_thread_fn) from [<c0083d3c>] (irq_thread+0x124/0x1f8)                                                
[ 1783.282794]  r7:00000001 r6:00000000 r5:ee650000 r4:ee62e8e4                                                                              
[ 1783.282802] [<c0083c18>] (irq_thread) from [<c00507cc>] (kthread+0xe4/0xfc)                                                               
[ 1783.282811]  r10:00000000 r9:00000000 r8:00000000 r7:c0083c18 r6:ee62e8c0 r5:ee62e900                                                     
[ 1783.282813]  r4:00000000                                                                                                                  
[ 1783.282821] [<c00506e8>] (kthread) from [<c000fb10>] (ret_from_fork+0x14/0x24)                                                            
[ 1783.282827]  r7:00000000 r6:00000000 r5:c00506e8 r4:ee62e900                                                                              
[ 1783.282830] ---[ end trace 0000000000000008 ]---    

   it seems that  the register  was protected.  how can i restore this problem?

   the linux version is: am57xx-evm 4.4.41-rt50-g968d071ce9