Skip to contentSkip to conversation

mips/bcm47xx/setup.c compile error

PATCH In review Adrian Bunk 5 participants 9 messages Feb 17, 2008 – Feb 28, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Commit d3c319f9c8d9ee2c042c60b8a1bbd909dcc42782 causes the following compile error:

<-- snip -->

...
CC arch/mips/bcm47xx/setup.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c: In function 'bcm47xx_get_invariants':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:95: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:97: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:99: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:101: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:103: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:105: error: 'struct ssb_sprom' has no member named 'r1' make[2]: *** [arch/mips/bcm47xx/setup.o] Error 1

<-- snip -->

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#1 lore raw
Quoted 5 lines · Adrian Bunk

Commit d3c319f9c8d9ee2c042c60b8a1bbd909dcc42782 causes the following compile error:

<-- snip -->

Quoted 11 lines

...
CC arch/mips/bcm47xx/setup.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c: In function 'bcm47xx_get_invariants':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:95: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:97: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:99: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:101: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:103: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:105: error: 'struct ssb_sprom' has no member named 'r1' make[2]: *** [arch/mips/bcm47xx/setup.o] Error 1

It has been broken by commit d3c319f9c8d9ee2c042c60b8a1bbd909dcc42782. I am working on a fix.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#2 lore raw
Quoted 18 lines · Aurelien Jarno
Quoted 5 lines · Adrian Bunk

Commit d3c319f9c8d9ee2c042c60b8a1bbd909dcc42782 causes the following compile error:

<-- snip -->

Quoted 11 lines

...
CC arch/mips/bcm47xx/setup.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c: In function 'bcm47xx_get_invariants':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:95: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:97: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:99: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:101: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:103: error: 'struct ssb_sprom' has no member named 'r1' /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/bcm47xx/setup.c:105: error: 'struct ssb_sprom' has no member named 'r1' make[2]: *** [arch/mips/bcm47xx/setup.o] Error 1

Quoted 2 lines

It has been broken by commit d3c319f9c8d9ee2c042c60b8a1bbd909dcc42782. I am working on a fix.

This commit has removed the r1 version of the SPROM data structure in favor of a version independant structure. However, it hasn't changed the other parts of code that are still using the r1 version.

Two patches are needed to fix that, one for the SSB subsystem, one for the BCM47XX platform. I will send them in separate emails.

I have tested them on a WGT634U machine, with the following patch:
http://www.linux-mips.org/archives/linux-mips/2008-02/msg00041.html

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#3 lore raw

PATCH 1/1 PCI core driver: use new SPROM data structure

Switch the SSB PCI core driver to the new SPROM data structure now that the old one has been removed.

---
 drivers/ssb/driver_pcicore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ssb/driver_pcicore.c +1 -1
index 2faaa90..191db7a 100644
@@ -362,7 +362,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
 	    chipid_top != 0x5300)
 		return 0;
 
-	if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
 		return 0;
 
 	/* The 200-pin BCM4712 package does not bond out PCI. Even when
Signature · 7 lines
1.5.4.1

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
Acked-by on v1 1/1
#4 lore raw

Re: [PATCH] [SSB] PCI core driver: use new SPROM data structure

Quoted 4 lines · On Monday 18 February 2008 11:02:57 Aurelien Jarno wrote:

Switch the SSB PCI core driver to the new SPROM data structure now that the old one has been removed.

John, can you please apply this?

Quoted 20 lines
---
 drivers/ssb/driver_pcicore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ssb/driver_pcicore.c +1 -1
index 2faaa90..191db7a 100644
@@ -362,7 +362,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
 	    chipid_top != 0x5300)
 		return 0;
 
-	if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
 		return 0;
 
 	/* The 200-pin BCM4712 package does not bond out PCI. Even when
Signature · 1 line
1.5.4.1
Signature · 1 line
Greetings Michael.
#5 lore raw

Re: [PATCH] [SSB] PCI core driver: use new SPROM data structure

Quoted 9 lines · Michael Buesch
Quoted 4 lines · On Monday 18 February 2008 11:02:57 Aurelien Jarno wrote:

Switch the SSB PCI core driver to the new SPROM data structure now that the old one has been removed.

John, can you please apply this?

John, any news about this patch?

Quoted 23 lines
Quoted 20 lines
---
 drivers/ssb/driver_pcicore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ssb/driver_pcicore.c +1 -1
index 2faaa90..191db7a 100644
@@ -362,7 +362,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
 	    chipid_top != 0x5300)
 		return 0;
 
-	if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
 		return 0;
 
 	/* The 200-pin BCM4712 package does not bond out PCI. Even when
Signature · 1 line
1.5.4.1
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#6 lore raw

Re: [PATCH] [SSB] PCI core driver: use new SPROM data structure

Quoted 5 lines · Aurelien Jarno
Quoted 4 lines · Michael Buesch
Quoted 3 lines · On Monday 18 February 2008 11:02:57 Aurelien Jarno wrote:

Switch the SSB PCI core driver to the new SPROM data structure now that the old one has been removed.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

John, can you please apply this?

John, any news about this patch?

I'm sorry, I must have missed it. I have to respin the pull request I sent to Dave M. yesterday anyway, so I'll include it in that.

Thanks for reminding me!

John

Signature · 2 lines
John W. Linville
[email protected]
#7 lore raw

[MIPS] BCM47XX: use new SSB SPROM data structure

In reply to Aurelien Jarno

Switch the BCM47XX code to the new SPROM data structure now that the old one has been removed.

---
 arch/mips/bcm47xx/setup.c   |   12 ++++++------
 arch/mips/bcm47xx/wgt634u.c |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
arch/mips/bcm47xx/setup.c +6 -6
index 1b6b0fa..8d36f18 100644
@@ -92,17 +92,17 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
 	iv->sprom.revision = 3;
 
 	if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
-		str2eaddr(buf, iv->sprom.r1.et0mac);
+		str2eaddr(buf, iv->sprom.et0mac);
 	if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
-		str2eaddr(buf, iv->sprom.r1.et1mac);
+		str2eaddr(buf, iv->sprom.et1mac);
 	if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
-		iv->sprom.r1.et0phyaddr = simple_strtoul(buf, NULL, 10);
+		iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
 	if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
-		iv->sprom.r1.et1phyaddr = simple_strtoul(buf, NULL, 10);
+		iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
 	if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
-		iv->sprom.r1.et0mdcport = simple_strtoul(buf, NULL, 10);
+		iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
 	if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
-		iv->sprom.r1.et1mdcport = simple_strtoul(buf, NULL, 10);
+		iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
 
 	return 0;
 }
arch/mips/bcm47xx/wgt634u.c +1 -1
index 5a017ea..f21a206 100644
@@ -50,7 +50,7 @@ static int __init wgt634u_init(void)
 	 * been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx.
 	 */
 
-	u8 *et0mac = ssb_bcm47xx.sprom.r1.et0mac;
+	u8 *et0mac = ssb_bcm47xx.sprom.et0mac;
 
 	if (et0mac[0] == 0x00 &&
 	    ((et0mac[1] == 0x09 && et0mac[2] == 0x5b) ||
Signature · 8 lines
1.5.4.1


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
Applied
#8 lore raw

Re: [MIPS] BCM47XX: use new SSB SPROM data structure

Quoted 2 lines · Aurelien Jarno

Switch the BCM47XX code to the new SPROM data structure now that the old one has been removed.

Thanks, applied too.

Ralf