linux-2.6.7 parallel port adapter
hi
using the parallel adapter (light) in 2.6.7
#CONFIG_I2C_PARPORT=yCONFIG_I2C_PARPORT_LIGHT is not set
causes a kernel panic ...
has anyone had similar problems or is it fixed in later versions (i did only a quick search)?
using the normal parallel port adapter
CONFIG_I2C_PARPORT=y
#CONFIG_I2C_PARPORT_LIGHT is not set
seems to work fine with sysfs but
causes problems over /dev/i2c-0 :
i2cdetect just takes forever to complete a run
e.g. just the following line took 5 minutes (and isnt correct)
20: UU UU UU UU UU UU UU UU XX XX XX XX XX XX XX XX
removing the physical adapter during the run, allows the program to terminate immediatly...
is that a problem with the i2c-to-parallel adapter ?
cheers,
nils roeder
Hi Nils,
Quoted 4 lines
using the parallel adapter (light) in 2.6.7
#CONFIG_I2C_PARPORT=y
CONFIG_I2C_PARPORT_LIGHTis not set
These lines make little sense. I guess you really mean:
#CONFIG_I2C_PARPORT is not set CONFIG_I2C_PARPORT_LIGHT=y
Right?
Quoted 3 lines
causes a kernel panic ...
has anyone had similar problems or is it fixed in later versions (i did only a quick search)?
Never had any report about this. Can't tell whether this has a chance to be fixed in 2.6.11+ without the kernel panic data.
Quoted 10 lines
using the normal parallel port adapter
CONFIG_I2C_PARPORT=y
#CONFIG_I2C_PARPORT_LIGHT is not setseems to work fine with sysfs but
causes problems over/dev/i2c-0:
i2cdetect just takes forever to complete a run
e.g. just the following line took 5 minutes (and isnt correct)
Quoted 6 lines
20: UU UU UU UU UU UU UU UU XX XX XX XX XX XX XX XX
removing the physical adapter during the run, allows the program to terminate immediatly...
is that a problem with the i2c-to-parallel adapter ?
Could be that your hardware adapter uses a different wiring than you told the driver to use. Check the "type" parameter and the i2c-parport.h definition file. If your adapter uses a different wiring from all those defined, you'll have to add a new type.
You should try the bit_test=1 parameter to the i2c-algo-bit module, it will test the lines when i2c-parport(-light) is loaded so you know whether the driver uses the correct pins or not.
Hope that helps,
Signature · 1 line
Jean Delvare
Hi Nils,
Quoted 2 lines
i could post the panic data (any particular kernel debug settings i should enable ?) if it would help.
Enabling all four I2C debug options (core, algorithms, busses, chips) may help.
Quoted 2 lines
do i have to have modules enabled to get this option ? (or is this not a kernel config parameter ?)
You can pass i2c_algo_bit.bit_test=1 to your boot loader.
Signature · 1 line
Jean Delvare
Quoted 3 lines
Quoted 2 lines
i2c-parport-light does direct I/O access on the parallel-port, which I think does only work on i386-like hardware.
It works perfectly fine under Linux-2.4.26,
Except that i2c-parport-light didn't exist before 2.6.2-rc1. Which driver are you using under 2.4.26?
Signature · 1 line
Jean Delvare
Hi Nils,
Quoted 9 lines
Quoted 2 lines
Except that i2c-parport-light didn't exist before 2.6.2-rc1. Which driver are you using under 2.4.26?
the philips parallel port adapter (i2c-philips-par.o)
CONFIG_I2C_PHILIPSPAR=yin 2.6.7 i assumed it would be
CONFIG_I2C_PARPORT=y
?
It is. i2c-philips-par (2.4) is equivalent to i2c-parport with type=0 (2.6). It is *not* equivalent to i2c-parport-light. So I still believe that i2c-parport-light is meant for x86 only by design, and this explains the problem kernel panic you observed. Most probably Kconfig should be fixed to limit i2c-parport-light to x86 and friends.
Signature · 1 line
Jean Delvare
Jean Delvare wrote:
[snip]
Quoted 4 lines
These lines make little sense. I guess you really mean:
#CONFIG_I2C_PARPORT is not setCONFIG_I2C_PARPORT_LIGHT=y
Right?
right :)
[snip]
Quoted 3 lines
Quoted 1 line
causes a kernel panic ...
Never had any report about this. Can't tell whether this has a chance to be fixed in 2.6.11+ without the kernel panic data.
i could post the panic data (any particular kernel debug settings i should enable ?) if it would help.
[snip]
Quoted 3 lines
You should try the bit_test=1 parameter to the i2c-algo-bit module, it will test the lines when i2c-parport(-light) is loaded so you know whether the driver uses the correct pins or not.
do i have to have modules enabled to get this option ? (or is this not a kernel config parameter ?)
cheers,
nils
Jean Delvare wrote:
[snip]
Quoted 2 lines
Never had any report about this. Can't tell whether this has a chance to be fixed in 2.6.11+ without the kernel panic data.
hi
here is what i get withCONFIG_I2C_PARPORT_LIGHT=y
..
i2c /dev entries driver
i2c-parport: using default base 0x378
Unable to handle kernel NULL pointer dereference at virtual address 00000378 pgd = c0004000 [00000378] *pgd 000000 Internal error: Oops: f5 [#1] CPU: 0 PC is at $a+0x38/0x88 LR is at 0x378 pc : [<c018bca4>] lr : [<00000378>] Not tainted
sp : c0a77fa4 ip : 00000000 fp : c0a77fb8
r10: 00000000 r9 : 00000000 r8 : 00000000
r7 : c001dee8 r6 : 00000014 r5 : c0262fc0 r4 : 00000001 r3 : c0262fc0 r2 : 00000000 r1 : 00000001 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: 397F Table: A0004000 DAC: 0000001D Process swapper (pid: 1, stack limit = 0xc0a760fc)
Stack: (0xc0a77fa4 to 0xc0a78000)
7fa0: c0262fc0 c0305e88 c0a77fd4 c0a77fbc c001820c c018bc78c001dec4
7fc0: c0a76000 00000000 c0a77ff4 c0a77fd8 c001e200 c0018170 00000000 00000000
7fe0: 00000000 00000000 00000000 c0a77ff8 c0037384 c001e184 00000000 00000000
Backtrace: [<c018bc6c>] ($a+0x0/0x88) from [<c001820c>] ($a+0xa8/0x138) r5 = C0305E88 r4 = C0262FC0 [<c0018164>] ($a+0x0/0x138) from [<c001e200>] ($a+0x88/0x174) r6 = 00000000 r5 = C0A76000 r4 = C001DEC4 [<c001e178>] ($a+0x0/0x174) from [<c0037384>] (do_exit+0x0/0x978) r7 = 00000000 r6 = 00000000 r5 = 00000000 r4 = 00000000 Code: e593e000 e0803005 e5d3c001 e5d31002 (e7de200c) <0>Kernel panic: Attempted to kill init!
Quoted 2 lines
Which architecture is it?
Intel's (ARM) XScale PXA255
Quoted 2 lines
i2c-parport-light does direct I/O access on the parallel-port, which I think does only work on i386-like hardware.
It works perfectly fine under Linux-2.4.26,
it only crashes under Linux-2.6.7
the i2c-parport (not light) does seem to work under 2.6.7, at least with the problem i described earlier (it is damn slow). i get a sysfs entry
/sys/devices/platform/i2c-0
with all device/chip subdirectories
(e.g. /0-004c for a pcf8591 with that address).
however reading and writing the input/output or
read/write files seems to be tooo slow.
thanks,
nils
Quoted 3 lines · Jean Delvare
Except that i2c-parport-light didn't exist before 2.6.2-rc1. Which driver are you using under 2.4.26?
the philips parallel port adapter (i2c-philips-par.o) CONFIG_I2C_PHILIPSPAR=y
in 2.6.7 i assumed it would beCONFIG_I2C_PARPORT=y
?
nils
Hi Nils,
Quoted 5 lines
here is what i get with
CONFIG_I2C_PARPORT_LIGHT=y
(...)
i2c /dev entries driver
i2c-parport: using default base0x378
Quoted 9 lines
Unable to handle kernel NULL pointer dereference at virtual address 00000378 pgd = c0004000 [00000378] *pgd 000000 Internal error: Oops: f5 [#1] CPU: 0 PC is at $a+0x38/0x88 LR is at 0x378 pc : [<c018bca4>] lr : [<00000378>] Not tainted
Huh. Doesn't look like anything I have seen before.
Which architecture is it?
i2c-parport-light does direct I/O access on the parallel-port, which I think does only work on i386-like hardware.
--
Jean Delvare
Hi Nils,
Quoted 4 lines
i2c-parport: using default base
0x378Unable to handle kernel NULL pointer dereference at virtual address00000378 pgd =
c0004000
[00000378] *pgd 000000
Do you happen to know how the parallel port is mapped on ARM?
Looks to me like it mixes address space and I/O space, maybe ARM doesn't make a difference between both?
I believe you should report this kernel panic to the ARM-Linux folks, and ask them whether they think i2c-parport-light should be limited to x86. I think they'll be more helpful on the topic than I can be.
Thanks,
Signature · 1 line
Jean Delvare
Quoted 6 lines · Jean Delvare
It is. i2c-philips-par (2.4) is equivalent to i2c-parport with type=0 (2.6). It is *not* equivalent to i2c-parport-light. So I still believe that i2c-parport-light is meant for x86 only by design, and this explains the problem kernel panic you observed. Most probably
Kconfigshould be fixed to limit i2c-parport-light to x86 and friends.
thanks for all the info/help.
nils
Hi Jean,
Quoted 1 line · Jean Delvare
Do you happen to know how the parallel port is mapped on ARM?
unfortunately not.
Quoted 2 lines
Looks to me like it mixes address space and I/O space, maybe ARM doesn't make a difference between both?
hm.
Quoted 3 lines
I believe you should report this kernel panic to the ARM-Linux folks, and ask them whether they think i2c-parport-light should be limited to x86. I think they'll be more helpful on the topic than I can be.
i will do that, thanks.
nils