diff mbox

linux 4.2-rc1 broken Nokia N900

Message ID 20150714163342.GA8512@deathray (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Welling July 14, 2015, 4:33 p.m. UTC
On Tue, Jul 14, 2015 at 09:14:12AM +0200, Pali Rohár wrote:
> On Monday 13 July 2015 17:36:07 Michael Welling wrote:
> > On Tue, Jul 14, 2015 at 12:02:44AM +0200, Pali Rohár wrote:
> > > I think nothing special. I just call:
> > > 
> > > export ARCH=arm
> > > export CROSS_COMPILE=arm-linux-gnueabi-
> > > make rx51_defconfig
> > > rm -f arch/arm/boot/zImage
> > > make -j12 zImage modules omap3-n900.dtb CONFIG_DEBUG_SECTION_MISMATCH=y
> > > cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > arch/arm/boot/zImage.new
> > > mv arch/arm/boot/zImage.new arch/arm/boot/zImage
> > >
> > 
> > Where are you getting rx51_defconfig from?
> > 
> > This does not appear to be in the kernel source any longer.
> > 
> > Can you try the above with omap2plus_defconfig?
> >  
> 
> It is in my linux-n900 repository: https://github.com/pali/linux-n900
> Repository contains more n900 specific patches but SPI code is unpatched
> 
> https://github.com/pali/linux-n900/blob/HEAD/arch/arm/configs/rx51_defconfig
> 
> Later in week I can try to compile also with omap2plus_defconfig...
> But in my opinion kernel should not crash with different configuration.

True.

Could you try the following change to the set_cs function and see if it helps.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pavel Machek July 14, 2015, 8:01 p.m. UTC | #1
On Tue 2015-07-14 11:33:42, Michael Welling wrote:
> On Tue, Jul 14, 2015 at 09:14:12AM +0200, Pali Rohár wrote:
> > On Monday 13 July 2015 17:36:07 Michael Welling wrote:
> > > On Tue, Jul 14, 2015 at 12:02:44AM +0200, Pali Rohár wrote:
> > > > I think nothing special. I just call:
> > > > 
> > > > export ARCH=arm
> > > > export CROSS_COMPILE=arm-linux-gnueabi-
> > > > make rx51_defconfig
> > > > rm -f arch/arm/boot/zImage
> > > > make -j12 zImage modules omap3-n900.dtb CONFIG_DEBUG_SECTION_MISMATCH=y
> > > > cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > arch/arm/boot/zImage.new
> > > > mv arch/arm/boot/zImage.new arch/arm/boot/zImage
> > > >
> > > 
> > > Where are you getting rx51_defconfig from?
> > > 
> > > This does not appear to be in the kernel source any longer.
> > > 
> > > Can you try the above with omap2plus_defconfig?
> > >  
> > 
> > It is in my linux-n900 repository: https://github.com/pali/linux-n900
> > Repository contains more n900 specific patches but SPI code is unpatched
> > 
> > https://github.com/pali/linux-n900/blob/HEAD/arch/arm/configs/rx51_defconfig
> > 
> > Later in week I can try to compile also with omap2plus_defconfig...
> > But in my opinion kernel should not crash with different configuration.
> 
> True.
> 
> Could you try the following change to the set_cs function and see if
>it helps.

Ok, so:

4.2-rc1 worked for me, IIRC.

4.2-rc2 oopses a lot.

4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
hard to tell if it is the same oops.

									Pavel

> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index 5867384..666038b 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -245,16 +245,18 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable)
>  
>  static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
>  {
> +	struct omap2_mcspi_cs *cs = spi->controller_state;
>  	u32 l;
>  
> -	/* The controller handles the inverted chip selects
> -	 * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert
> -	 * the inversion from the core spi_set_cs function.
> -	 */
> -	if (spi->mode & SPI_CS_HIGH)
> -		enable = !enable;
> +	if (cs) {
> +
Michael Welling July 14, 2015, 8:17 p.m. UTC | #2
On Tue, Jul 14, 2015 at 10:01:26PM +0200, Pavel Machek wrote:
> On Tue 2015-07-14 11:33:42, Michael Welling wrote:
> > On Tue, Jul 14, 2015 at 09:14:12AM +0200, Pali Rohár wrote:
> > > On Monday 13 July 2015 17:36:07 Michael Welling wrote:
> > > > On Tue, Jul 14, 2015 at 12:02:44AM +0200, Pali Rohár wrote:
> > > > > I think nothing special. I just call:
> > > > > 
> > > > > export ARCH=arm
> > > > > export CROSS_COMPILE=arm-linux-gnueabi-
> > > > > make rx51_defconfig
> > > > > rm -f arch/arm/boot/zImage
> > > > > make -j12 zImage modules omap3-n900.dtb CONFIG_DEBUG_SECTION_MISMATCH=y
> > > > > cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > arch/arm/boot/zImage.new
> > > > > mv arch/arm/boot/zImage.new arch/arm/boot/zImage
> > > > >
> > > > 
> > > > Where are you getting rx51_defconfig from?
> > > > 
> > > > This does not appear to be in the kernel source any longer.
> > > > 
> > > > Can you try the above with omap2plus_defconfig?
> > > >  
> > > 
> > > It is in my linux-n900 repository: https://github.com/pali/linux-n900
> > > Repository contains more n900 specific patches but SPI code is unpatched
> > > 
> > > https://github.com/pali/linux-n900/blob/HEAD/arch/arm/configs/rx51_defconfig
> > > 
> > > Later in week I can try to compile also with omap2plus_defconfig...
> > > But in my opinion kernel should not crash with different configuration.
> > 
> > True.
> > 
> > Could you try the following change to the set_cs function and see if
> >it helps.
> 
> Ok, so:
> 
> 4.2-rc1 worked for me, IIRC.

This does not make sense.

Nothing has changed in drivers/spi between these versions.

Are you sure that 4.2-rc1 worked for you?

> 
> 4.2-rc2 oopses a lot.
> 
> 4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
> hard to tell if it is the same oops.
> 
> 									Pavel
> 
> > diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> > index 5867384..666038b 100644
> > --- a/drivers/spi/spi-omap2-mcspi.c
> > +++ b/drivers/spi/spi-omap2-mcspi.c
> > @@ -245,16 +245,18 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable)
> >  
> >  static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
> >  {
> > +	struct omap2_mcspi_cs *cs = spi->controller_state;
> >  	u32 l;
> >  
> > -	/* The controller handles the inverted chip selects
> > -	 * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert
> > -	 * the inversion from the core spi_set_cs function.
> > -	 */
> > -	if (spi->mode & SPI_CS_HIGH)
> > -		enable = !enable;
> > +	if (cs) {
> > +
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek July 15, 2015, 7:49 p.m. UTC | #3
Hi!

> > Ok, so:
> > 
> > 4.2-rc1 worked for me, IIRC.
> 
> This does not make sense.
> 
> Nothing has changed in drivers/spi between these versions.
> Are you sure that 4.2-rc1 worked for you?

Tested again: yes, I have 4.2-rc1 booted on the device... based on
Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
configs and trees to some public place.

> > 4.2-rc2 oopses a lot.
> > 
> > 4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
> > hard to tell if it is the same oops.

But... I'm not sure I'm getting the same oops.
								Pavel
Michael Welling July 15, 2015, 8:10 p.m. UTC | #4
On Wed, Jul 15, 2015 at 09:49:33PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > Ok, so:
> > > 
> > > 4.2-rc1 worked for me, IIRC.
> > 
> > This does not make sense.
> > 
> > Nothing has changed in drivers/spi between these versions.
> > Are you sure that 4.2-rc1 worked for you?
> 
> Tested again: yes, I have 4.2-rc1 booted on the device... based on
> Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
> configs and trees to some public place.
> 

Interesting. Something very strange is happening here.
Send me the links if you push your tree/config to a public repo. 

I would not hurt to have the same from Pali for comparison.

> > > 4.2-rc2 oopses a lot.
> > > 
> > > 4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
> > > hard to tell if it is the same oops.
> 
> But... I'm not sure I'm getting the same oops.

If the system is still booting, you could tell if the oopses were the
same if your touchscreen and wifi do no work.

> 								Pavel
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michael Welling July 20, 2015, 8:48 p.m. UTC | #5
On Wed, Jul 15, 2015 at 09:49:33PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > Ok, so:
> > > 
> > > 4.2-rc1 worked for me, IIRC.
> > 
> > This does not make sense.
> > 
> > Nothing has changed in drivers/spi between these versions.
> > Are you sure that 4.2-rc1 worked for you?
> 
> Tested again: yes, I have 4.2-rc1 booted on the device... based on
> Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
> configs and trees to some public place.
> 
> > > 4.2-rc2 oopses a lot.
> > > 
> > > 4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
> > > hard to tell if it is the same oops.
> 
> But... I'm not sure I'm getting the same oops.
> 								Pavel

Any progress as to what is causing the oops for you starting at 4.2-rc2?

> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek July 21, 2015, 7:31 a.m. UTC | #6
On Wed 2015-07-15 15:10:48, Michael Welling wrote:
> On Wed, Jul 15, 2015 at 09:49:33PM +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > > Ok, so:
> > > > 
> > > > 4.2-rc1 worked for me, IIRC.
> > > 
> > > This does not make sense.
> > > 
> > > Nothing has changed in drivers/spi between these versions.
> > > Are you sure that 4.2-rc1 worked for you?
> > 
> > Tested again: yes, I have 4.2-rc1 booted on the device... based on
> > Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
> > configs and trees to some public place.
> > 
> 
> Interesting. Something very strange is happening here.
> Send me the links if you push your tree/config to a public repo. 

Pushing now. It is on
kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900 mini-v4.2

f1376b91c1c765cf041235c14ac44c04d56fd2a9 is broken

cb8b6850aa49f72f226629796e349dd75d3f4f78 mostly works. (My notes say
that GSM is broken, but they may be not enough patches applied.) I
believe I even run the "tefone" testsuite, with only s2ram acting
funny.

https://gitlab.com/tui/tui/tree/master/ofone

> I would not hurt to have the same from Pali for comparison.
> 
> > > > 4.2-rc2 oopses a lot.
> > > > 
> > > > 4.2-rc2+ this patch oopses, too. I don't have serial console, so it is
> > > > hard to tell if it is the same oops.
> > 
> > But... I'm not sure I'm getting the same oops.
> 
> If the system is still booting, you could tell if the oopses were the
> same if your touchscreen and wifi do no work.

I'm pretty sure they worked. I'd notice broken touchscreen.

(Sorry, I'm a bit busy at the moment).

Best regards,
									Pavel
Pavel Machek July 21, 2015, 7:33 a.m. UTC | #7
On Tue 2015-07-21 09:31:27, Pavel Machek wrote:
> On Wed 2015-07-15 15:10:48, Michael Welling wrote:
> > On Wed, Jul 15, 2015 at 09:49:33PM +0200, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > > Ok, so:
> > > > > 
> > > > > 4.2-rc1 worked for me, IIRC.
> > > > 
> > > > This does not make sense.
> > > > 
> > > > Nothing has changed in drivers/spi between these versions.
> > > > Are you sure that 4.2-rc1 worked for you?
> > > 
> > > Tested again: yes, I have 4.2-rc1 booted on the device... based on
> > > Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
> > > configs and trees to some public place.
> > > 
> > 
> > Interesting. Something very strange is happening here.
> > Send me the links if you push your tree/config to a public repo. 
> 
> Pushing now. It is on
> kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900 mini-v4.2

Actually, pali, if you have time. I pushed

kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900 n900-v4.2

too, that one should work. (Modulo gsm and s2ram). If you could
confirm that, that would be great.

Best regards,
								Pavel
Pali Rohár July 21, 2015, 8:04 a.m. UTC | #8
On Tuesday 21 July 2015 09:33:00 Pavel Machek wrote:
> On Tue 2015-07-21 09:31:27, Pavel Machek wrote:
> > On Wed 2015-07-15 15:10:48, Michael Welling wrote:
> > > On Wed, Jul 15, 2015 at 09:49:33PM +0200, Pavel Machek wrote:
> > > > Hi!
> > > > 
> > > > > > Ok, so:
> > > > > > 
> > > > > > 4.2-rc1 worked for me, IIRC.
> > > > > 
> > > > > This does not make sense.
> > > > > 
> > > > > Nothing has changed in drivers/spi between these versions.
> > > > > Are you sure that 4.2-rc1 worked for you?
> > > > 
> > > > Tested again: yes, I have 4.2-rc1 booted on the device... based on
> > > > Linus' 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 . I can push the
> > > > configs and trees to some public place.
> > > > 
> > > 
> > > Interesting. Something very strange is happening here.
> > > Send me the links if you push your tree/config to a public repo. 
> > 
> > Pushing now. It is on
> > kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900 mini-v4.2
> 
> Actually, pali, if you have time. I pushed
> 
> kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900 n900-v4.2
> 
> too, that one should work. (Modulo gsm and s2ram). If you could
> confirm that, that would be great.
> 
> Best regards,
> 								Pavel
> 								

Ok, I will try it at the weekend... Anyway, can you rebase patches on
top of some linus tree? Because via that git.kernel.org web it is
impossible to list commits or read diff/patches which you applied.
diff mbox

Patch

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 5867384..666038b 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -245,16 +245,18 @@  static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable)
 
 static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
 {
+	struct omap2_mcspi_cs *cs = spi->controller_state;
 	u32 l;
 
-	/* The controller handles the inverted chip selects
-	 * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert
-	 * the inversion from the core spi_set_cs function.
-	 */
-	if (spi->mode & SPI_CS_HIGH)
-		enable = !enable;
+	if (cs) {
+
+		/* The controller handles the inverted chip selects
+		 * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert
+		 * the inversion from the core spi_set_cs function.
+		 */
+		if (spi->mode & SPI_CS_HIGH)
+			enable = !enable;
 
-	if (spi->controller_state) {
 		l = mcspi_cached_chconf0(spi);
 
 		if (enable)