spi: Fix pxa2xx_spi.c chip select sequence error
cover spi: Fix pxa2xx_spi.c chip select sequence error
My next message of this subject contains a patch for the issue initially raised by the thread: "PXA270 SSPSFRM gates chip select ?"
This patch is created to apply to the development kernel: 2.6.25-rc1. This kernel has a newly re-organized regs-ssp.h file, and since I needed to add a new bit definition to that file, it is included in the patch. However, as noted in the comments to the patch, kernels 2.6.20 (when the bug was introduced) through 2.6.24 have the ssp bit definitions in pxa-regs.h, so the extra bit needs to be added there for the earlier versions.
David:
Is there a defined procedure for distributing patches the can be applied to different kernel versions, when they won't apply directly?
---
Also note that I am still developing on 2.6.20, and so I have only tested this code on that version. Furthermore, I don't use chip select, so really I just compiled and ran the changes to show that they do no harm.
David:
Can I assume that you or someone up the chain will go through the motions of applying this patch to 2.6.25 and showing that it compiles? I really don't expect any trouble with that.
Scott:
Can you apply the patch to your 2.6.21 tree, and see if it fixes your original problem? Note that you will have to add the bit definition line to include/asm-arm/arch-pxa/pxa-regs.h, by hand, or alter the file names in the patch from regs-ssp.h to pxa-regs.h
Signature · 13 lines
Ned Forrester nforrester-/[email protected] Oceanographic Systems Lab 508-289-2226 Applied Ocean Physics and Engineering Dept. Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 http://www.whoi.edu/hpb/Site.do?id=1532 http://www.whoi.edu/page.do?pid=10079 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 6 lines · On Sun, 17 Feb 2008 23:35:29 -0500 Ned Forrester…
Scott:
Can you apply the patch to your 2.6.21 tree, and see if it fixes your original problem? Note that you will have to add the bit definition line to
include/asm-arm/arch-pxa/pxa-regs.h, by hand, or alter the file names in the patch fromregs-ssp.htopxa-regs.h
I am pleased to report that the supplied Patch DOES indeed appear to correct the corruption (translation) that I was seeing in the first SPI data transferred after a reboot :)
Thanks, Scott.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 11 lines · J. Scott Merritt
Quoted 6 lines · On Sun, 17 Feb 2008 23:35:29 -0500 Ned Forrester…
Scott:
Can you apply the patch to your 2.6.21 tree, and see if it fixes your original problem? Note that you will have to add the bit definition line to
include/asm-arm/arch-pxa/pxa-regs.h, by hand, or alter the file names in the patch fromregs-ssp.htopxa-regs.h
Quoted 3 lines
I am pleased to report that the supplied Patch DOES indeed appear to correct the corruption (translation) that I was seeing in the first SPI data transferred after a reboot :)
Thanks for testing.
Signature · 13 lines
Ned Forrester nforrester-/[email protected] Oceanographic Systems Lab 508-289-2226 Applied Ocean Physics and Engineering Dept. Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 http://www.whoi.edu/hpb/Site.do?id=1532 http://www.whoi.edu/page.do?pid=10079 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 11 lines · Ned Forrester
Quoted 10 lines · J. Scott Merritt
Quoted 6 lines · On Sun, 17 Feb 2008 23:35:29 -0500 Ned Forrester…
Scott:
Can you apply the patch to your 2.6.21 tree, and see if it fixes your original problem? Note that you will have to add the bit definition line to
include/asm-arm/arch-pxa/pxa-regs.h, by hand, or alter the file names in the patch fromregs-ssp.htopxa-regs.h
Quoted 5 lines
Quoted 3 lines
I am pleased to report that the supplied Patch DOES indeed appear to correct the corruption (translation) that I was seeing in the first SPI data transferred after a reboot :)
Thanks for testing.
David:
It appears that the patch works, and there have been no other comments in the past several days. Unless you have comments of your own, is it time to push "[Patch 1/1] spi: Fix pxa2xx_spi.c chip select sequence error" up stream?
Signature · 13 lines
Ned Forrester nforrester-/[email protected] Oceanographic Systems Lab 508-289-2226 Applied Ocean Physics and Engineering Dept. Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 http://www.whoi.edu/hpb/Site.do?id=1532 http://www.whoi.edu/page.do?pid=10079 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 5 lines
David:
Is there a defined procedure for distributing patches the can be applied to different kernel versions, when they won't apply directly?
A couple of them. One is to just cc the "stable" list, possibly with a note about merge issues. Another is to leave the issue up to other folk who support back-rev kernels, which isn't quite as useful.
Quoted 6 lines
David:
Can I assume that you or someone up the chain will go through the motions of applying this patch to 2.6.25 and showing that it compiles? I really don't expect any trouble with that.
Yes.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/