Skip to contentSkip to conversation

next-20150511 / omap2-mcspi: regression for sdp4430 boot

DISCUSSION Nishanth Menon 2 participants 10 messages May 11, 2015 – May 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

Generates infinite "ks8851 spi1.0: ks8851_irq: spi bus error" errors and hangs the platform.

Bisected the issue down to the following two commits when reverted allows the board to function:

commit b28cb9414db9f8e42ac18c9e360e4e99cda42489

Author: Michael Welling <[email protected]>
Date:   Thu May 7 18:36:53 2015 -0500

spi: omap2-mcspi: Switch driver to use transfer_one

Switches from transfer_one_message to transfer_one to prepare
driver for
use of GPIO chip selects.

Reverting this alone: http://paste.ubuntu.org.cn/2594735 (did not boot up)

commit bc7f9bbc80bcc77745b3f54ec4e7103e3e142bb9

Author: Michael Welling <[email protected]>
Date:   Fri May 8 13:31:01 2015 -0500

spi: omap2-mcspi: Add gpio_request and init CS

If GPIO chip select is specified, request the GPIO in the setup
function
and release it in the cleanup function.

Reverting this as well allowed boot.

Signature · 2 lines
Regards,
Nishanth Menon
#1 lore raw
Quoted 10 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Quoted 40 lines

Generates infinite "ks8851 spi1.0: ks8851_irq: spi bus error" errors and hangs the platform.

Bisected the issue down to the following two commits when reverted allows the board to function:

commit b28cb9414db9f8e42ac18c9e360e4e99cda42489

Author: Michael Welling <[email protected]>
Date:   Thu May 7 18:36:53 2015 -0500

spi: omap2-mcspi: Switch driver to use transfer_one

Switches from transfer_one_message to transfer_one to prepare
driver for
use of GPIO chip selects.

Reverting this alone: http://paste.ubuntu.org.cn/2594735 (did not boot up)

commit bc7f9bbc80bcc77745b3f54ec4e7103e3e142bb9

Author: Michael Welling <[email protected]>
Date:   Fri May 8 13:31:01 2015 -0500

spi: omap2-mcspi: Add gpio_request and init CS

If GPIO chip select is specified, request the GPIO in the setup
function
and release it in the cleanup function.

Reverting this as well allowed boot.

Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw
Quoted 8 lines · Michael Welling
Quoted 7 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

Quoted 7 lines
Quoted 3 lines

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Let me know if there is any test patch you'd want me to run. The board is on a remote "board farm" which most of TI folks have access to as well.. So, if you need anything run, just send out a debug patch OR a potential fix and we can help try it out and provide logs back for your debug.

Signature · 2 lines
Regards,
Nishanth Menon
#3 lore raw
Quoted 17 lines · Nishanth Menon
Quoted 8 lines · Michael Welling
Quoted 7 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

Quoted 7 lines
Quoted 3 lines

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Quoted 5 lines

Let me know if there is any test patch you'd want me to run. The board is on a remote "board farm" which most of TI folks have access to as well.. So, if you need anything run, just send out a debug patch OR a potential fix and we can help try it out and provide logs back for your debug.

Okay.

It looks like you revert the patches in the wrong order above.

The GPIO patch should apply after the transfer_one patch so it should logically be reverted in the reverse order.

Quoted 5 lines
Signature · 3 lines
-- 
Regards,
Nishanth Menon
#4 lore raw
Quoted 24 lines · Michael Welling
Quoted 17 lines · Nishanth Menon
Quoted 8 lines · Michael Welling
Quoted 7 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

Quoted 7 lines
Quoted 3 lines

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Quoted 5 lines

Let me know if there is any test patch you'd want me to run. The board is on a remote "board farm" which most of TI folks have access to as well.. So, if you need anything run, just send out a debug patch OR a potential fix and we can help try it out and provide logs back for your debug.

Quoted 7 lines

Okay.

It looks like you revert the patches in the wrong order above.

The GPIO patch should apply after the transfer_one patch so it should logically be reverted in the reverse order.

Apologies on a slow response, was tracking another LPAE regression down.

I did do that -> but logged it in reverse - unfortunately it seems to have caused a little more confusion :(. is there something else you'd like me to do?

git log next-20150508..next-20150511 drivers/spi
Tells me:

commit bc7f9bbc80bcc77745b3f54ec4e7103e3e142bb9

Author: Michael Welling <[email protected]>
Date:   Fri May 8 13:31:01 2015 -0500

spi: omap2-mcspi: Add gpio_request and init CS

If GPIO chip select is specified, request the GPIO in the setup
function
and release it in the cleanup function.

commit b28cb9414db9f8e42ac18c9e360e4e99cda42489

Author: Michael Welling <[email protected]>
Date:   Thu May 7 18:36:53 2015 -0500

spi: omap2-mcspi: Switch driver to use transfer_one

Switches from transfer_one_message to transfer_one to prepare
driver for
use of GPIO chip selects.

my tested git log looks as follows: (redid it just to be sure):

a4617b41e04c Revert "spi: omap2-mcspi: Switch driver to use transfer_one"
http://paste.ubuntu.org.cn/2595136

b49011271c7f Revert "spi: omap2-mcspi: Add gpio_request and init CS"
http://paste.ubuntu.org.cn/2595142

012034602bd6 HACK: Makefile: Build a uImage with dtb already appended f17107cb8886 Add linux-next specific files for 20150511

012034602bd6 commit is
https://github.com/nmenon/linux-2.6-playground/commit/177f5f71b3f2 -> for legacy platforms needing uImage based booting.

Signature · 2 lines
Regards,
Nishanth Menon
#5 lore raw
Quoted 29 lines · Nishanth Menon
Quoted 28 lines · Michael Welling
Quoted 17 lines · Nishanth Menon
Quoted 8 lines · Michael Welling
Quoted 7 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

Quoted 7 lines
Quoted 3 lines

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Quoted 5 lines

Let me know if there is any test patch you'd want me to run. The board is on a remote "board farm" which most of TI folks have access to as well.. So, if you need anything run, just send out a debug patch OR a potential fix and we can help try it out and provide logs back for your debug.

Okay.

It looks like you revert the patches in the wrong order above.

Quoted 8 lines
Quoted 3 lines

The GPIO patch should apply after the transfer_one patch so it should logically be reverted in the reverse order.

Apologies on a slow response, was tracking another LPAE regression down.

I did do that -> but logged it in reverse - unfortunately it seems to have caused a little more confusion :(. is there something else you'd like me to do?

Okay I have another patch that appears to fix the issue on my board.

Please test the attached patch and see if it fixes the issue on your board.

If it does, I will send it upstream.

Quoted 41 lines

git log next-20150508..next-20150511 drivers/spi
Tells me:

commit bc7f9bbc80bcc77745b3f54ec4e7103e3e142bb9

Author: Michael Welling <[email protected]>
Date:   Fri May 8 13:31:01 2015 -0500

spi: omap2-mcspi: Add gpio_request and init CS

If GPIO chip select is specified, request the GPIO in the setup
function
and release it in the cleanup function.

commit b28cb9414db9f8e42ac18c9e360e4e99cda42489

Author: Michael Welling <[email protected]>
Date:   Thu May 7 18:36:53 2015 -0500

spi: omap2-mcspi: Switch driver to use transfer_one

Switches from transfer_one_message to transfer_one to prepare
driver for
use of GPIO chip selects.

my tested git log looks as follows: (redid it just to be sure):

a4617b41e04c Revert "spi: omap2-mcspi: Switch driver to use transfer_one"
http://paste.ubuntu.org.cn/2595136

b49011271c7f Revert "spi: omap2-mcspi: Add gpio_request and init CS"
http://paste.ubuntu.org.cn/2595142

Quoted 10 lines

012034602bd6 HACK: Makefile: Build a uImage with dtb already appended f17107cb8886 Add linux-next specific files for 20150511

012034602bd6 commit is
https://github.com/nmenon/linux-2.6-playground/commit/177f5f71b3f2 -> for legacy platforms needing uImage based booting.

Signature · 2 lines
Regards,
Nishanth Menon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: omap-mcspi.patch
Type: text/x-diff
Size: 2909 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150511/b4b4d9fb/attachment.bin>

#6 lore raw

On 05/11/2015 03:16 PM, Michael Welling wrote:
[...]

Quoted 5 lines

Okay I have another patch that appears to fix the issue on my board.

Please test the attached patch and see if it fixes the issue on your board.

If it does, I will send it upstream.

Tested on: 20150512 http://paste.ubuntu.org.cn/2600365
Works :). Thanks for rootcausing and providing a fix.

Signature · 2 lines
Regards,
Nishanth Menon
#7 lore raw
Quoted 10 lines · Nishanth Menon

On 05/11/2015 03:16 PM, Michael Welling wrote:
[...]

Quoted 5 lines

Okay I have another patch that appears to fix the issue on my board.

Please test the attached patch and see if it fixes the issue on your board.

If it does, I will send it upstream.

Tested on: 20150512 http://paste.ubuntu.org.cn/2600365
Works :). Thanks for rootcausing and providing a fix.

Phew.

Okay this patch or a revision of it should land upstream soon.

Quoted 4 lines
Signature · 3 lines
-- 
Regards,
Nishanth Menon
#8 lore raw
Quoted 7 lines · Michael Welling
Quoted 6 lines · Nishanth Menon

On 05/11/2015 03:16 PM, Michael Welling wrote:
[...]

Quoted 4 lines

Okay I have another patch that appears to fix the issue on my board.

Please test the attached patch and see if it fixes the issue on your board.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

If it does, I will send it upstream.

Tested on: 20150512 http://paste.ubuntu.org.cn/2600365
Works :). Thanks for rootcausing and providing a fix.

Phew.

Okay this patch or a revision of it should land upstream soon.

please feel free to cc linux-omap at vger.kernel.org -> one of us will try and provide a tested-by to the formal patch -> might be good to add a "Fixes:" tag as well if Mark wishes to see something to the effect.

Signature · 2 lines
Regards,
Nishanth Menon
#9 lore raw
In reply to Nishanth Menon
Quoted 17 lines · Nishanth Menon
Quoted 8 lines · Michael Welling
Quoted 7 lines · Nishanth Menon

Hi,

SDP4430 uses a SPI based network chip ks8851.

next-20150508:
https://github.com/nmenon/kernel-test-logs/blob/next-20150508/omap2plus_defconfig/sdp4430.txt

Quoted 7 lines
Quoted 3 lines

However, next-20150511:
https://github.com/nmenon/kernel-test-logs/blob/next-20150511/omap2plus_defconfig/sdp4430.txt

I will look into this but it is going to be difficult to debug with access to the hardware. This is what I get for changing a driver that effects so many SoCs.

Quoted 6 lines

Let me know if there is any test patch you'd want me to run. The board is on a remote "board farm" which most of TI folks have access to as well.. So, if you need anything run, just send out a debug patch OR a potential fix and we can help try it out and provide logs back for your debug.

So it appears that I have broken the native chip select support.

I have a serial flash at spi0cs0 and if I use the GPIO for chip select it detects:
m25p80 spi1.0: n25q128a13 (16384 Kbytes)

If I use the native chip select it does not:
m25p80 spi1.0: unrecognized JEDEC id bytes: ff, ff, ff

This allows me to find the issue and provide a follow up patch. I will provide it when I have it ready to see if it fixes your issue.

If I cannot find a fix, we may have to revert these changes.

Quoted 4 lines
Signature · 3 lines
-- 
Regards,
Nishanth Menon