nitin vishnoi

SPI based GPIO Expander issue on IMX51.

Discussion created by nitin vishnoi on Jan 30, 2012
Latest reply on Feb 20, 2012 by nitin vishnoi



I am trying to make GPIO expander driver on IMX51.

I have a chip mcp23s17 i added the driver for the same.


But whenever its going in to the read function of the driver it throws the below error.


root@freescale/home/modules_install$ insmod mcp23s08.ko

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT
last sysfs file:
Modules linked in: mcp23s08(+)
CPU: 0    Not tainted  ( #19)
PC is at mxc_spi_buf_tx_u8+0x8/0x14
LR is at spi_put_tx_data+0x24/0x50
pc : [<802794dc>]    lr : [<802795bc>]    psr: 80000013
sp : 9a1c7f28  ip : 00000008  fp : 00000000
r10: 9a0bf318  r9 : 9a0bf800  r8 : 9b86e004
r7 : 00000001  r6 : 9a0bf318  r5 : 00000002  r4 : 9b86e000
r3 : 00000000  r2 : 9a0bf318  r1 : 00000002  r0 : 9a0bf318
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: aa41c019  DAC: 00000017
Process mxc_spi.0 (pid: 249, stack limit = 0x9a1c62e8)
Stack: (0x9a1c7f28 to 0x9a1c8000)
7f20:                   9a0bf318 9a419e08 9a0bf800 00000001 9a419e2c 8027a248
7f40: 9a419e08 00000000 9a1c6000 9a419e4c 9a419e2c 80279168 9a1c6000 ffffffff
7f60: 80279600 9a0bf32c 9a1a02e0 9a1c6000 9a1a02e0 9a1a02e8 80278fe8 9a1c7f94
7f80: 9a0bf320 00000000 9a0bf31c 800786b0 9a1c6000 00000000 9a1bae60 8007c044
7fa0: 9a1c7fa0 9a1c7fa0 00000000 9a029e78 9a1c7fd4 80078530 9a1a02e0 00000000
7fc0: 00000000 00000000 00000000 8007bd00 00000000 00000000 9a1c7fd8 9a1c7fd8
7fe0: 00000000 9a029e78 8007bc88 800389e0 00000013 800389e0 ffffbfdf 00000002
[<802794dc>] (mxc_spi_buf_tx_u8+0x8/0x14) from [<802795bc>] (spi_put_tx_data+0x24/0x50)
[<802795bc>] (spi_put_tx_data+0x24/0x50) from [<8027a248>] (mxc_spi_transfer+0xdc/0x15c)
[<8027a248>] (mxc_spi_transfer+0xdc/0x15c) from [<80279168>] (bitbang_work+0x180/0x304)
[<80279168>] (bitbang_work+0x180/0x304) from [<800786b0>] (worker_thread+0x180/0x22c)
[<800786b0>] (worker_thread+0x180/0x22c) from [<8007bd00>] (kthread+0x78/0x80)
[<8007bd00>] (kthread+0x78/0x80) from [<800389e0>] (kernel_thread_exit+0x0/0x8)
Code: e5803050 e12fff1e e590304c e1a02000 (e4d30001)
---[ end trace 1b027d2e3a77bec4 ]---





So i am not getting any idea why this error is coming while trying to read some register value.


Any help will be thankful.