2008-02-17 20:11:50

by Adrian Bunk

[permalink] [raw]
Subject: mips/bcm47xx/setup.c compile error

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

--

"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


2008-02-18 08:27:24

by Aurelien Jarno

[permalink] [raw]
Subject: Re: mips/bcm47xx/setup.c compile error

On Sun, Feb 17, 2008 at 10:09:47PM +0200, Adrian Bunk wrote:
> 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
>

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


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

2008-02-18 10:02:45

by Aurelien Jarno

[permalink] [raw]
Subject: Re: mips/bcm47xx/setup.c compile error

On Mon, Feb 18, 2008 at 08:49:44AM +0100, Aurelien Jarno wrote:
> On Sun, Feb 17, 2008 at 10:09:47PM +0200, Adrian Bunk wrote:
> > 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
> >
>
> 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

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

2008-02-18 10:03:25

by Aurelien Jarno

[permalink] [raw]
Subject: [PATCH] [SSB] 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.

Signed-off-by: Aurelien Jarno <[email protected]>
---
drivers/ssb/driver_pcicore.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 2faaa90..191db7a 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -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
--
1.5.4.1

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

2008-02-18 10:04:56

by Aurelien Jarno

[permalink] [raw]
Subject: [MIPS] BCM47XX: use new SSB SPROM data structure

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

Signed-off-by: Aurelien Jarno <[email protected]>
---
arch/mips/bcm47xx/setup.c | 12 ++++++------
arch/mips/bcm47xx/wgt634u.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 1b6b0fa..8d36f18 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -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;
}
diff --git a/arch/mips/bcm47xx/wgt634u.c b/arch/mips/bcm47xx/wgt634u.c
index 5a017ea..f21a206 100644
--- a/arch/mips/bcm47xx/wgt634u.c
+++ b/arch/mips/bcm47xx/wgt634u.c
@@ -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) ||
--
1.5.4.1


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

2008-02-18 18:11:37

by Michael Büsch

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

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.
>
> Signed-off-by: Aurelien Jarno <[email protected]>

Acked-by: Michael Buesch <[email protected]>

John, can you please apply this?

> ---
> drivers/ssb/driver_pcicore.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
> index 2faaa90..191db7a 100644
> --- a/drivers/ssb/driver_pcicore.c
> +++ b/drivers/ssb/driver_pcicore.c
> @@ -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
> --
> 1.5.4.1
>



--
Greetings Michael.

2008-02-19 17:02:05

by Ralf Baechle

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

On Mon, Feb 18, 2008 at 11:04:31AM +0100, Aurelien Jarno wrote:

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

Thanks, applied too.

Ralf

2008-02-28 14:11:57

by Aurelien Jarno

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

Michael Buesch a ?crit :
> 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.
>>
>> Signed-off-by: Aurelien Jarno <[email protected]>
>
> Acked-by: Michael Buesch <[email protected]>
>
> John, can you please apply this?

John, any news about this patch?

>> ---
>> drivers/ssb/driver_pcicore.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
>> index 2faaa90..191db7a 100644
>> --- a/drivers/ssb/driver_pcicore.c
>> +++ b/drivers/ssb/driver_pcicore.c
>> @@ -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
>> --
>> 1.5.4.1
>>
>
>
>


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

2008-02-28 15:03:55

by John W. Linville

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

On Thu, Feb 28, 2008 at 03:11:26PM +0100, Aurelien Jarno wrote:
> Michael Buesch a ?crit :
> > 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.
> >>
> >> Signed-off-by: Aurelien Jarno <[email protected]>
> >
> > Acked-by: Michael Buesch <[email protected]>
> >
> > 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
--
John W. Linville
[email protected]