MIPS: BCM47XX: Make bcma init NVRAM instead of bcm47xx polling it
Rafał Miłecki
maintainerPATCH 1/1 MIPS: BCM47XX: Make bcma init NVRAM instead of bcm47xx polling it
This drops ssb/bcma dependency and will allow us to make it a standalone driver.
---
This patch depends on
[PATCH V2] MIPS: BCM47XX: Make ssb init NVRAM instead of bcm47xx polling it
--- arch/mips/bcm47xx/nvram.c | 42 ++---------------------------------------- drivers/bcma/driver_mips.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 42 deletions(-)
arch/mips/bcm47xx/nvram.c +2 -40
@@ -121,48 +121,10 @@ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)return err; } -#ifdef CONFIG_BCM47XX_BCMA -static int nvram_init_bcma (void ) -{ -struct bcma_drv_cc *cc = &bcm47xx_bus.bcma.bus.drv_cc; -u32 base; -u32 lim; - -#ifdef CONFIG_BCMA_NFLASH -if (cc->nflash.boot) { - base =BCMA_SOC_FLASH1 ; - lim =BCMA_SOC_FLASH1_SZ ; - } else -#endif -if (cc->pflash.present) { - base = cc->pflash.window; - lim = cc->pflash.window_size; -#ifdef CONFIG_BCMA_SFLASH - }else if (cc->sflash.present) { - base = cc->sflash.window; - lim = cc->sflash.size; -#endif - }else { -pr_err ("Couldn't find supported flash memory\n" ); -return -ENXIO ; - } - -return bcm47xx_nvram_init_from_mem (base, lim); -} -#endif -static int nvram_init (void ) { -switch (bcm47xx_bus_type) { -#ifdef CONFIG_BCM47XX_SSB -case BCM47XX_BUS_TYPE_SSB : -break ; -#endif -#ifdef CONFIG_BCM47XX_BCMA -case BCM47XX_BUS_TYPE_BCMA : -return nvram_init_bcma (); -#endif - } +/* TODO: Look for MTD "nvram" partition */ +return -ENXIO ; }
drivers/bcma/driver_mips.c +11 -2
@@ -20,6 +20,9 @@#include <linux/serial_core.h> #include <linux/serial_reg.h> #include <linux/time.h> +#ifdef CONFIG_BCM47XX +#include <bcm47xx_nvram.h> +#endif enum bcma_boot_dev {BCMA_BOOT_DEV_UNK =0 ,
@@ -323,10 +326,16 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)switch (boot_dev) {case BCMA_BOOT_DEV_PARALLEL :case BCMA_BOOT_DEV_SERIAL : -/* TODO: Init NVRAM using BCMA_SOC_FLASH2 window */ +#ifdef CONFIG_BCM47XX +bcm47xx_nvram_init_from_mem (BCMA_SOC_FLASH2 , +BCMA_SOC_FLASH2_SZ ); +#endif break ;case BCMA_BOOT_DEV_NAND : -/* TODO: Init NVRAM using BCMA_SOC_FLASH1 window */ +#ifdef CONFIG_BCM47XX +bcm47xx_nvram_init_from_mem (BCMA_SOC_FLASH1 , +BCMA_SOC_FLASH1_SZ ); +#endif break ;default :break ;
Signature · 1 line
1.8.4.5
Quoted 7 lines · Rafał Miłecki
This drops ssb/bcma dependency and will allow us to make it a standalone driver.
Signed-off-by Rafał Miłecki <[email protected]>---
This patch depends on
[PATCH V2] MIPS: BCM47XX: Make ssb init NVRAM instead of bcm47xx polling it
You've even posted a V3 of that patch:
V2: https://patchwork.linux-mips.org/patch/7609/
V3: https://patchwork.linux-mips.org/patch/7612/
I assume you meant V3?
Ralf
Rafał Miłecki
maintainerQuoted 10 lines · Ralf Baechle
Quoted 7 lines · Rafał Miłecki
This drops ssb/bcma dependency and will allow us to make it a standalone driver.
Signed-off-by Rafał Miłecki <[email protected]>---
This patch depends on
[PATCH V2] MIPS: BCM47XX: Make ssb init NVRAM instead of bcm47xx polling it
Quoted 6 lines
You've even posted a V3 of that patch:
V2: https://patchwork.linux-mips.org/patch/7609/
V3: https://patchwork.linux-mips.org/patch/7612/I assume you meant V3?
You're right of course :)
Signature · 1 line
Rafał
Quoted 1 line · Rafał Miłecki
Quoted 1 line
This patch in turn depends on
https://patchwork.linux-mips.org/patch/7605/
against which Hauke raised some objections. Wanna sort those?
Ralf
Rafał Miłecki
maintainerQuoted 9 lines · Ralf Baechle
Quoted 1 line · Rafał Miłecki
Quoted 1 line
This patch in turn depends on
https://patchwork.linux-mips.org/patch/7605/
against which Hauke raised some objections. Wanna sort those?
7605 is V1 with mistakes pointed by Hauke
7611 is V2 which fixes things pointed by Hauke
Please use
http://patchwork.linux-mips.org/patch/7611/
Signature · 1 line
Rafał
Ralf Baechle
AppliedQuoted 5 lines · Rafał Miłecki
7605 is V1 with mistakes pointed by Hauke
7611 is V2 which fixes things pointed by Hauke
Ah, 7611 has a different subject that's why I didn't notice there was a v2.
All three of
https://patchwork.linux-mips.org/patch/7611/
https://patchwork.linux-mips.org/patch/7612/
https://patchwork.linux-mips.org/patch/8233/
applied. Thanks!
Ralf
Rafał Miłecki
maintainerQuoted 11 lines · Ralf Baechle
Quoted 5 lines · Rafał Miłecki
7605 is V1 with mistakes pointed by Hauke
7611 is V2 which fixes things pointed by HaukeAh, 7611 has a different subject that's why I didn't notice there was a v2.
Quoted 7 lines
All three of
https://patchwork.linux-mips.org/patch/7611/
https://patchwork.linux-mips.org/patch/7612/
https://patchwork.linux-mips.org/patch/8233/applied. Thanks!
Thank you! To avoid similar confusion in the future, I've created patchwork account that will allow me to mark old (superseded) patches.
In case you find time to push two more pending BCM47XX patches, it would be great to see them in your tree.
1) [V2] MIPS: BCM47XX: Move SPROM fallback code into sprom.c
http://patchwork.linux-mips.org/patch/8232/
It's a rebased version of patch sent ~2 months ago (7617) that was Acked-by Hauke
2) MIPS: BCM47XX: Initialize bcma bus later (with mm available)
http://patchwork.linux-mips.org/patch/8234/
It's resend-ing of RFC patch (7606) that also was Acked-by Hauke.
Quoted 26 lines · Rafał Miłecki
Quoted 11 lines · Ralf Baechle
Quoted 5 lines · Rafał Miłecki
7605 is V1 with mistakes pointed by Hauke
7611 is V2 which fixes things pointed by HaukeAh, 7611 has a different subject that's why I didn't notice there was a v2.
Quoted 7 lines
All three of
https://patchwork.linux-mips.org/patch/7611/
https://patchwork.linux-mips.org/patch/7612/
https://patchwork.linux-mips.org/patch/8233/applied. Thanks!
Thank you! To avoid similar confusion in the future, I've created patchwork account that will allow me to mark old (superseded) patches.
In case you find time to push two more pending BCM47XX patches, it would be great to see them in your tree.
Quoted 8 lines
1) [V2] MIPS: BCM47XX: Move SPROM fallback code into
sprom.c
http://patchwork.linux-mips.org/patch/8232/
It's a rebased version of patch sent ~2 months ago (7617) that was Acked-by Hauke2) MIPS: BCM47XX: Initialize bcma bus later (with mm available)
http://patchwork.linux-mips.org/patch/8234/
It's resend-ing of RFC patch (7606) that also was Acked-by Hauke.
I'm working my way through but with the occasional test build it's going to take a while to work through that 7 mile deep puddle :)
Ralf
Quoted 2 lines · Rafał Miłecki
Thank you! To avoid similar confusion in the future, I've created patchwork account that will allow me to mark old (superseded) patches.
Yes, I wish everybody would do that. Would save me from the daily heart attack when I open patchwork and see 2.71 metric gazillion patches pending - only to later find out that half of them were superseeded by later revision!
It's also useful in case a submitter has multiple email addresses. It allows to search for one address and find all submissions.
Quoted 11 lines
In case you find time to push two more pending BCM47XX patches, it would be great to see them in your tree.
1) [V2] MIPS: BCM47XX: Move SPROM fallback code into
sprom.c
http://patchwork.linux-mips.org/patch/8232/
It's a rebased version of patch sent ~2 months ago (7617) that was Acked-by Hauke2) MIPS: BCM47XX: Initialize bcma bus later (with mm available)
http://patchwork.linux-mips.org/patch/8234/
It's resend-ing of RFC patch (7606) that also was Acked-by Hauke.
Both applied and pushed.
Ralf