brcm47xx: fix regression in NVRAM support for WGT634U
authorRafał Miłecki <zajec5@gmail.com>
Wed, 6 May 2015 05:54:19 +0000 (05:54 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Wed, 6 May 2015 05:54:19 +0000 (05:54 +0000)
We were calculating wrong offset, NVRAM wasn't found and OpenWrt didn't
boot.

Fixes: 9019803 ("brcm47xx: backport BCM47XX arch patches (clean NVRAM code, later init)")
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45618

target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch
target/linux/brcm47xx/patches-4.0/820-wgt634u-nvram-fix.patch

index 714fb6d18a7505e8281cce8b6d6f298efe076117..51ff74301a3ca9957c6ffbb3553ad334e684b777 100644 (file)
@@ -260,8 +260,8 @@ out the configuration than the in kernel cfe config reader.
 +
 +      /* XXX: hack for supporting the CFE environment stuff on WGT634U */
 +      if (lim >= 8 * 1024 * 1024) {
-+              src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
-+              dst = (u32 *) nvram_buf;
++              src = (u32 *)(iobase + 8 * 1024 * 1024 - 0x2000);
++              dst = (u32 *)nvram_buf;
 +
 +              if ((*src & 0xff00ff) == 0x000001) {
 +                      printk("early_nvram_init: WGT634U NVRAM found.\n");
index 714fb6d18a7505e8281cce8b6d6f298efe076117..51ff74301a3ca9957c6ffbb3553ad334e684b777 100644 (file)
@@ -260,8 +260,8 @@ out the configuration than the in kernel cfe config reader.
 +
 +      /* XXX: hack for supporting the CFE environment stuff on WGT634U */
 +      if (lim >= 8 * 1024 * 1024) {
-+              src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
-+              dst = (u32 *) nvram_buf;
++              src = (u32 *)(iobase + 8 * 1024 * 1024 - 0x2000);
++              dst = (u32 *)nvram_buf;
 +
 +              if ((*src & 0xff00ff) == 0x000001) {
 +                      printk("early_nvram_init: WGT634U NVRAM found.\n");