[pasemi] problem with i2c-pasemi

7 messages, 2 authors, 2016-08-01 · open the first message on its own page

[pasemi] problem with i2c-pasemi

From: Christian Zigotzky <hidden>
Date: 2016-07-30 13:32:15

Hello Olof,

I compiled the latest git kernel 2 days ago. The kernel boots and works 
but unfortunately I get the following error messages about the 
i2c-pasemi during the start:

[    3.553461] i2c /dev entries driver
[    3.554462] couldn't get idr
[    3.554463] ------------[ cut here ]------------
[    3.554474] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 
.__i2c_add_numbered_adapter+0x80/0xc0
[    3.554477] Modules linked in:
[    3.554482] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554485] task: c00000026d116d80 ti: c00000026d120000 task.ti: 
c00000026d120000
[    3.554487] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 
0000000000000000
[    3.554490] REGS: c00000026d123370 TRAP: 0700   Not tainted 
(4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.554502] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 
42870d22  XER: 20000000
[    3.554540] SOFTE: 1
                GPR00: c0000000007f1b6c c00000026d1235f0 
c0000000017bc600 0000000000000010
                GPR04: 0000000000000001 0000000000000000 
0000000000000010 c0000000018ec600
                GPR08: 2067657420696472 0000000000000000 
0000000000000000 0000000000000030
                GPR12: 2067657420696472 c00000000ffff000 
c000000000009b10 0000000000000000
                GPR16: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR20: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR24: 0000000000000000 c0000000016c86d8 
c000000001555110 0000000000000000
                GPR28: c000000001629ec8 c000000001628fc0 
ffffffffffffffe4 c00000026b16f408
[    3.554545] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554549] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.554551] Call Trace:
[    3.554557] [c00000026d1235f0] [c0000000007f1b6c] 
.__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.554563] [c00000026d123680] [c0000000007f4b58] 
.pasemi_smb_probe+0x12c/0x188
[    3.554569] [c00000026d123710] [c0000000004b0fb0] 
.pci_device_probe+0x90/0x100
[    3.554576] [c00000026d1237a0] [c0000000006d3c10] 
.driver_probe_device+0x15c/0x2c8
[    3.554581] [c00000026d123840] [c0000000006d3e2c] 
.__driver_attach+0xb0/0xe0
[    3.554586] [c00000026d1238d0] [c0000000006d1920] 
.bus_for_each_dev+0xac/0xc0
[    3.554591] [c00000026d123970] [c0000000006d35ac] 
.driver_attach+0x34/0x40
[    3.554597] [c00000026d1239f0] [c0000000006d2ff4] 
.bus_add_driver+0x104/0x244
[    3.554602] [c00000026d123a90] [c0000000006d4758] 
.driver_register+0xc0/0x110
[    3.554608] [c00000026d123b20] [c0000000004b06f4] 
.__pci_register_driver+0x58/0x64
[    3.554615] [c00000026d123bb0] [c00000000153134c] 
.pasemi_smb_driver_init+0x24/0x38
[    3.554621] [c00000026d123c20] [c0000000000094ac] 
.do_one_initcall+0xd8/0x174
[    3.554626] [c00000026d123d00] [c0000000014eed98] 
.kernel_init_freeable+0x188/0x244
[    3.554632] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.554638] [c00000026d123e30] [c000000000007ee8] 
.ret_from_kernel_thread+0x58/0x70
[    3.554639] Instruction dump:
[    3.554648] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 
2f9e0000 409c002c
[    3.554657] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 
3860fff0 419e002c
[    3.554661] ---[ end trace cac6a75782ca269c ]---
[    3.554673] i2c-pasemi: probe of 0000:00:1c.0 failed with error -16
[    3.554724] couldn't get idr
[    3.554725] ------------[ cut here ]------------
[    3.554733] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 
.__i2c_add_numbered_adapter+0x80/0xc0
[    3.554735] Modules linked in:
[    3.554739] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 
4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554742] task: c00000026d116d80 ti: c00000026d120000 task.ti: 
c00000026d120000
[    3.554744] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 
0000000000000000
[    3.554747] REGS: c00000026d123370 TRAP: 0700   Tainted: G W 
(4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.554758] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 
42870d22  XER: 20000000
[    3.554795] SOFTE: 1
                GPR00: c0000000007f1b6c c00000026d1235f0 
c0000000017bc600 0000000000000010
                GPR04: 0000000000000001 0000000000000000 
0000000000000010 c0000000018ec600
                GPR08: 2067657420696472 0000000000000000 
0000000000000000 0000000000000030
                GPR12: 2067657420696472 c00000000ffff000 
c000000000009b10 0000000000000000
                GPR16: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR20: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR24: 0000000000000000 c0000000016c86d8 
c000000001555110 0000000000000000
                GPR28: c000000001629ec8 c000000001628fc0 
ffffffffffffffe4 c00000026b16f408
[    3.554800] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554805] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.554806] Call Trace:
[    3.554812] [c00000026d1235f0] [c0000000007f1b6c] 
.__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.554818] [c00000026d123680] [c0000000007f4b58] 
.pasemi_smb_probe+0x12c/0x188
[    3.554823] [c00000026d123710] [c0000000004b0fb0] 
.pci_device_probe+0x90/0x100
[    3.554829] [c00000026d1237a0] [c0000000006d3c10] 
.driver_probe_device+0x15c/0x2c8
[    3.554834] [c00000026d123840] [c0000000006d3e2c] 
.__driver_attach+0xb0/0xe0
[    3.554839] [c00000026d1238d0] [c0000000006d1920] 
.bus_for_each_dev+0xac/0xc0
[    3.554844] [c00000026d123970] [c0000000006d35ac] 
.driver_attach+0x34/0x40
[    3.554850] [c00000026d1239f0] [c0000000006d2ff4] 
.bus_add_driver+0x104/0x244
[    3.554855] [c00000026d123a90] [c0000000006d4758] 
.driver_register+0xc0/0x110
[    3.554861] [c00000026d123b20] [c0000000004b06f4] 
.__pci_register_driver+0x58/0x64
[    3.554867] [c00000026d123bb0] [c00000000153134c] 
.pasemi_smb_driver_init+0x24/0x38
[    3.554873] [c00000026d123c20] [c0000000000094ac] 
.do_one_initcall+0xd8/0x174
[    3.554878] [c00000026d123d00] [c0000000014eed98] 
.kernel_init_freeable+0x188/0x244
[    3.554883] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.554889] [c00000026d123e30] [c000000000007ee8] 
.ret_from_kernel_thread+0x58/0x70
[    3.554891] Instruction dump:
[    3.554899] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 
2f9e0000 409c002c
[    3.554907] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 
3860fff0 419e002c
[    3.554909] ---[ end trace cac6a75782ca269d ]---
[    3.554919] i2c-pasemi: probe of 0000:00:1c.1 failed with error -16
[    3.554968] couldn't get idr
[    3.554969] ------------[ cut here ]------------
[    3.554977] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 
.__i2c_add_numbered_adapter+0x80/0xc0
[    3.554979] Modules linked in:
[    3.554983] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 
4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554986] task: c00000026d116d80 ti: c00000026d120000 task.ti: 
c00000026d120000
[    3.554988] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 
0000000000000000
[    3.554991] REGS: c00000026d123370 TRAP: 0700   Tainted: G W 
(4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.555001] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 
42870d22  XER: 20000000
[    3.555038] SOFTE: 1
                GPR00: c0000000007f1b6c c00000026d1235f0 
c0000000017bc600 0000000000000010
                GPR04: 0000000000000001 0000000000000000 
0000000000000010 c0000000018ec600
                GPR08: 2067657420696472 0000000000000000 
0000000000000000 0000000000000030
                GPR12: 2067657420696472 c00000000ffff000 
c000000000009b10 0000000000000000
                GPR16: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR20: 0000000000000000 0000000000000000 
0000000000000000 0000000000000000
                GPR24: 0000000000000000 c0000000016c86d8 
c000000001555110 0000000000000000
                GPR28: c000000001629ec8 c000000001628fc0 
ffffffffffffffe4 c00000026b16f408
[    3.555043] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.555047] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.555048] Call Trace:
[    3.555055] [c00000026d1235f0] [c0000000007f1b6c] 
.__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.555060] [c00000026d123680] [c0000000007f4b58] 
.pasemi_smb_probe+0x12c/0x188
[    3.555065] [c00000026d123710] [c0000000004b0fb0] 
.pci_device_probe+0x90/0x100
[    3.555071] [c00000026d1237a0] [c0000000006d3c10] 
.driver_probe_device+0x15c/0x2c8
[    3.555076] [c00000026d123840] [c0000000006d3e2c] 
.__driver_attach+0xb0/0xe0
[    3.555082] [c00000026d1238d0] [c0000000006d1920] 
.bus_for_each_dev+0xac/0xc0
[    3.555087] [c00000026d123970] [c0000000006d35ac] 
.driver_attach+0x34/0x40
[    3.555092] [c00000026d1239f0] [c0000000006d2ff4] 
.bus_add_driver+0x104/0x244
[    3.555097] [c00000026d123a90] [c0000000006d4758] 
.driver_register+0xc0/0x110
[    3.555103] [c00000026d123b20] [c0000000004b06f4] 
.__pci_register_driver+0x58/0x64
[    3.555109] [c00000026d123bb0] [c00000000153134c] 
.pasemi_smb_driver_init+0x24/0x38
[    3.555115] [c00000026d123c20] [c0000000000094ac] 
.do_one_initcall+0xd8/0x174
[    3.555120] [c00000026d123d00] [c0000000014eed98] 
.kernel_init_freeable+0x188/0x244
[    3.555126] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.555131] [c00000026d123e30] [c000000000007ee8] 
.ret_from_kernel_thread+0x58/0x70
[    3.555133] Instruction dump:
[    3.555141] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 
2f9e0000 409c002c
[    3.555149] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 
3860fff0 419e002c
[    3.555151] ---[ end trace cac6a75782ca269e ]---
[    3.555161] i2c-pasemi: probe of 0000:00:1c.2 failed with error -16

The commit "Merge branch 'i2c/for-4.8'" is the problem. Link: 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=66304207cd341045df34195b4a8d422075bff513

I reverted the i2c commit with:

git revert 66304207cd341045df34195b4a8d422075bff513 -m 1

After that I was able to compile it. It boots without the error messages 
about the i2c-pasemi.

Do we need to modify the "i2c-pasemi.c"?

Cheers,

Christian

Re: [pasemi] problem with i2c-pasemi

From: Wolfram Sang <hidden>
Date: 2016-07-30 19:02:00

On Sat, Jul 30, 2016 at 03:26:04PM +0200, Christian Zigotzky wrote:
Hello Olof,

I compiled the latest git kernel 2 days ago. The kernel boots and works but
unfortunately I get the following error messages about the i2c-pasemi during
the start:
Which I2C busses do you have on your board and how are they described?
Can you post that?

Thanks,

   Wolfram

[pasemi] problem with i2c-pasemi

From: Christian Zigotzky <hidden>
Date: 2016-07-30 22:30:59

Information about our I2C/SMBus busses:

     00:1c.0 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 70
        Region 0: I/O ports at 7f0200 [size=64]

     00:1c.1 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 71
        Region 0: I/O ports at 7f0240 [size=64]

     00:1c.2 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 72
        Region 0: I/O ports at 7f0280 [size=64]

SMbus Controllers
The CPU provides 3 SMbus controllers, and these are used to connect up 
various SMbus and I2C devices. The number of SMbusses is expanded to 7 
via a 1:4 multiplexer on SMbus 1.

SMbus 0 is connected to the 4 DIMM sockets to support Serial Presence 
Detect (SPD). It is also connected to a standard 24LC128 EEPROM, and a 
temperature sensor (Texas Instruments TMP423). This sensor is connected 
to the CPU on-die temperature diodes for the 2 cores and SOC (main logic).

Cheers,

Christian


On 30 July 2016 at 8:20 PM, Wolfram Sang wrote:
Which I2C busses do you have on your board and how are they described?
Can you post that?

Thanks,

    Wolfram

Re: [pasemi] problem with i2c-pasemi

From: Wolfram Sang <hidden>
Date: 2016-07-31 06:37:07

    00:1c.2 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
       Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
       Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
       Interrupt: pin A routed to IRQ 72
       Region 0: I/O ports at 7f0280 [size=64]

SMbus Controllers
The CPU provides 3 SMbus controllers, and these are used to connect up
various SMbus and I2C devices. The number of SMbusses is expanded to 7 via a
1:4 multiplexer on SMbus 1.
Can you send the output of 'i2cdetect -l' (you need i2c-tools for that).
I assume the multiplexed bus occupies the bus number the above bus 1c.2
wants to have. This was present all the time, my recent change only made
it visible.

[pasemi] problem with i2c-pasemi

From: Christian Zigotzky <hidden>
Date: 2016-07-31 07:42:15

Here you are:

i2c-0    i2c           Radeon i2c bit bus 0x90             I2C adapter
i2c-1    i2c           Radeon i2c bit bus 0x91             I2C adapter
i2c-2    i2c           Radeon i2c bit bus 0x92             I2C adapter
i2c-3    i2c           Radeon i2c bit bus 0x93             I2C adapter
i2c-4    i2c           Radeon i2c bit bus 0x94             I2C adapter
i2c-5    i2c           Radeon i2c bit bus 0x95             I2C adapter
i2c-6    i2c           Radeon i2c bit bus 0x96             I2C adapter
i2c-7    i2c           Radeon i2c bit bus 0x97             I2C adapter
i2c-8    i2c           card0-DP-1                          I2C adapter
i2c-9    i2c           card0-DP-2                          I2C adapter

- Christian

On 31 July 2016 at 08:36 AM, Wolfram Sang wrote:
quoted
     00:1c.2 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 72
        Region 0: I/O ports at 7f0280 [size=64]

SMbus Controllers
The CPU provides 3 SMbus controllers, and these are used to connect up
various SMbus and I2C devices. The number of SMbusses is expanded to 7 via a
1:4 multiplexer on SMbus 1.
Can you send the output of 'i2cdetect -l' (you need i2c-tools for that).
I assume the multiplexed bus occupies the bus number the above bus 1c.2
wants to have. This was present all the time, my recent change only made
it visible.

Re: [pasemi] problem with i2c-pasemi

From: Wolfram Sang <hidden>
Date: 2016-08-01 07:32:42

On Sun, Jul 31, 2016 at 09:36:00AM +0200, Christian Zigotzky wrote:
Here you are:

i2c-0    i2c           Radeon i2c bit bus 0x90             I2C adapter
i2c-1    i2c           Radeon i2c bit bus 0x91             I2C adapter
i2c-2    i2c           Radeon i2c bit bus 0x92             I2C adapter
i2c-3    i2c           Radeon i2c bit bus 0x93             I2C adapter
i2c-4    i2c           Radeon i2c bit bus 0x94             I2C adapter
i2c-5    i2c           Radeon i2c bit bus 0x95             I2C adapter
i2c-6    i2c           Radeon i2c bit bus 0x96             I2C adapter
i2c-7    i2c           Radeon i2c bit bus 0x97             I2C adapter
i2c-8    i2c           card0-DP-1                          I2C adapter
i2c-9    i2c           card0-DP-2                          I2C adapter
Thanks. So, that means you don't have any bus from i2c-pasemi, since all
numbered busses it wants to have [0-2] are already taken by the Radeon
card. This has always been the case, no change in behaviour since 2008.
Only since last merge window, the I2C core just reports this conflict.
Maybe a bit too noisy?

I don't think using i2c_add_numbered_adapter is a good idea together
with PCI cards. I'd prefer to see i2c_add_adapter used. However, I don't
know the platform at all and if there is someone relying on a static
numbering scheme? I would assume this is not the case, because nobody
really noticed that the busses do not probe for a while. Anyone here
with more insight about PASEMI platform?

[pasemi] problem with i2c-pasemi

From: Christian Zigotzky <hidden>
Date: 2016-08-01 09:07:13

Hello Wolfram,

Many thanks for your explanation. Olof knows the PASEMI platform very 
well. Maybe he could explain more. Adrian has also a good knowledge 
about the Nemo board.

Cheers,

Christian

On 01 August 2016 at 09:32 AM, Wolfram Sang wrote:
On Sun, Jul 31, 2016 at 09:36:00AM +0200, Christian Zigotzky wrote:
quoted
Here you are:

i2c-0    i2c           Radeon i2c bit bus 0x90             I2C adapter
i2c-1    i2c           Radeon i2c bit bus 0x91             I2C adapter
i2c-2    i2c           Radeon i2c bit bus 0x92             I2C adapter
i2c-3    i2c           Radeon i2c bit bus 0x93             I2C adapter
i2c-4    i2c           Radeon i2c bit bus 0x94             I2C adapter
i2c-5    i2c           Radeon i2c bit bus 0x95             I2C adapter
i2c-6    i2c           Radeon i2c bit bus 0x96             I2C adapter
i2c-7    i2c           Radeon i2c bit bus 0x97             I2C adapter
i2c-8    i2c           card0-DP-1                          I2C adapter
i2c-9    i2c           card0-DP-2                          I2C adapter
Thanks. So, that means you don't have any bus from i2c-pasemi, since all
numbered busses it wants to have [0-2] are already taken by the Radeon
card. This has always been the case, no change in behaviour since 2008.
Only since last merge window, the I2C core just reports this conflict.
Maybe a bit too noisy?

I don't think using i2c_add_numbered_adapter is a good idea together
with PCI cards. I'd prefer to see i2c_add_adapter used. However, I don't
know the platform at all and if there is someone relying on a static
numbering scheme? I would assume this is not the case, because nobody
really noticed that the busses do not probe for a while. Anyone here
with more insight about PASEMI platform?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help