Skip to contentSkip to conversation

bcma: keep info about parallel flash presentence

PATCH In review Rafał Miłecki 4 participants 8 messages Aug 9, 2012 – Aug 10, 2012 Broadcom specific amba driver (bcma)

lore
Share & tools
lore

Rafał Miłecki

author maintainer
#0 lore raw

PATCH 1/1 bcma: keep info about parallel flash presentence

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

---
 drivers/bcma/driver_mips.c                  |    2 +-
 include/linux/bcma/bcma_driver_chipcommon.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/bcma/driver_mips.c +1 -1
index cc65b45..55acba9 100644
@@ -192,12 +192,12 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
 		bcma_debug(bus, "Found parallel flash\n");
 		bus->drv_cc.pflash.window = 0x1c000000;
 		bus->drv_cc.pflash.window_size = 0x02000000;
-
 		if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) &
 		     BCMA_CC_FLASH_CFG_DS) == 0)
 			bus->drv_cc.pflash.buswidth = 1;
 		else
 			bus->drv_cc.pflash.buswidth = 2;
+		bus->drv_cc.pflash.present = true;
 		break;
 	default:
 		bcma_err(bus, "Flash type not supported\n");
include/linux/bcma/bcma_driver_chipcommon.h +1 -0
index 3fb8bba..16c266c 100644
@@ -510,6 +510,7 @@ struct bcma_chipcommon_pmu {
 
 #ifdef CONFIG_BCMA_DRIVER_MIPS
 struct bcma_pflash {
+	bool present;
 	u8 buswidth;
 	u32 window;
 	u32 window_size;
Signature · 1 line
1.7.7
author maintainer
#2 lore raw

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 10 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Signature · 1 line
Rafał
author maintainer
#3 lore raw

2012/8/10 Rafał Miłecki <[email protected]>:

Quoted 10 lines

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 9 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Quoted 5 lines
Quoted 1 line

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Ah, and device. My Netgear WNDR4500 has serial flash and NAND flash. It doesn't have parallel one, so this code crashes my device.

Signature · 1 line
Rafał
#4 lore raw
In reply to Rafał Miłecki
Quoted 10 lines · Rafał Miłecki

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 9 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Quoted 5 lines
Quoted 1 line

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Letting this patches get merged into the wireless tree and an other patches which depends on this one into the mips tree will cause problems, because the wireless tree only gets merged into the mips tree indirectly round about the rc1 release in form of the rc1 release done by Linus.

The patch to arch/mips/bcm47xx/nvram.c will depend on this one and you should submit them to the same tree.

Hauke

author maintainer
#5 lore raw

2012/8/10 Hauke Mehrtens <[email protected]>:

Quoted 17 lines · Rafał Miłecki
Quoted 10 lines

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 9 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Quoted 5 lines
Quoted 1 line

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Quoted 8 lines

Letting this patches get merged into the wireless tree and an other patches which depends on this one into the mips tree will cause problems, because the wireless tree only gets merged into the mips tree indirectly round about the rc1 release in form of the rc1 release done by Linus.

The patch to arch/mips/bcm47xx/nvram.c will depend on this one and you should submit them to the same tree.

I'm planning to wait until rc2 (or rc3 if needed). I know the dependency :)

Signature · 1 line
Rafał
#6 lore raw
Quoted 24 lines · Rafał Miłecki

2012/8/10 Hauke Mehrtens <[email protected]>:

Quoted 23 lines · Rafał Miłecki
Quoted 10 lines

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 9 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Quoted 5 lines
Quoted 1 line

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Letting this patches get merged into the wireless tree and an other patches which depends on this one into the mips tree will cause problems, because the wireless tree only gets merged into the mips tree indirectly round about the rc1 release in form of the rc1 release done by Linus.

Quoted 4 lines
Quoted 2 lines

The patch to arch/mips/bcm47xx/nvram.c will depend on this one and you should submit them to the same tree.

I'm planning to wait until rc2 (or rc3 if needed). I know the dependency :)

Which rc2? Because Ralf probably won't have it in his tree until the 3.7-rc1 timeframe...

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
author maintainer
#7 lore raw

2012/8/10 John W. Linville <[email protected]>:

Quoted 25 lines · Rafał Miłecki
Quoted 24 lines

2012/8/10 Hauke Mehrtens <[email protected]>:

Quoted 23 lines · Rafał Miłecki
Quoted 10 lines

2012/8/10 Arend van Spriel <[email protected]>:

Quoted 9 lines · Rafał Miłecki
Quoted 7 lines

This allows drivers to access flash conditionally and stop crashing some devices.

---
John: I suggest taking it for wirelesss, AKA fix

Quoted 5 lines
Quoted 1 line

Maybe you could mentioned devices and/or drivers crashes without this patch?

Yes, sure! The problematic one for me is arch/mips/bcm47xx/nvram.c. Right now it assumes every BCMA board has pflash. I'll submit fix for mips tree when this patch hits it.

Letting this patches get merged into the wireless tree and an other patches which depends on this one into the mips tree will cause problems, because the wireless tree only gets merged into the mips tree indirectly round about the rc1 release in form of the rc1 release done by Linus.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

The patch to arch/mips/bcm47xx/nvram.c will depend on this one and you should submit them to the same tree.

I'm planning to wait until rc2 (or rc3 if needed). I know the dependency :)

Which rc2? Because Ralf probably won't have it in his tree until the 3.7-rc1 timeframe...

Ouch, I hoped bcma fix will go into 3.6-rc2 or 3.6-rc3 and Ralf will rebase his tree against Linus at some point...

OK, I'll try to send additional bcm47xx fix through yours tree (after Ralf accepts it).

Signature · 1 line
Rafał