brcm47xx: fix regression in NVRAM support for WGT634U
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45618 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
ad6c82948f
commit
559da27e07
|
@ -260,8 +260,8 @@ out the configuration than the in kernel cfe config reader.
|
||||||
+
|
+
|
||||||
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
||||||
+ if (lim >= 8 * 1024 * 1024) {
|
+ if (lim >= 8 * 1024 * 1024) {
|
||||||
+ src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
|
+ src = (u32 *)(iobase + 8 * 1024 * 1024 - 0x2000);
|
||||||
+ dst = (u32 *) nvram_buf;
|
+ dst = (u32 *)nvram_buf;
|
||||||
+
|
+
|
||||||
+ if ((*src & 0xff00ff) == 0x000001) {
|
+ if ((*src & 0xff00ff) == 0x000001) {
|
||||||
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
||||||
|
|
|
@ -260,8 +260,8 @@ out the configuration than the in kernel cfe config reader.
|
||||||
+
|
+
|
||||||
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
||||||
+ if (lim >= 8 * 1024 * 1024) {
|
+ if (lim >= 8 * 1024 * 1024) {
|
||||||
+ src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
|
+ src = (u32 *)(iobase + 8 * 1024 * 1024 - 0x2000);
|
||||||
+ dst = (u32 *) nvram_buf;
|
+ dst = (u32 *)nvram_buf;
|
||||||
+
|
+
|
||||||
+ if ((*src & 0xff00ff) == 0x000001) {
|
+ if ((*src & 0xff00ff) == 0x000001) {
|
||||||
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
||||||
|
|
Loading…
Reference in New Issue