linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Eval boards should not need to mess with ROOT_DEV
@ 2007-10-08 15:12 Grant Likely
  2007-10-08 15:27 ` Kumar Gala
  0 siblings, 1 reply; 10+ messages in thread
From: Grant Likely @ 2007-10-08 15:12 UTC (permalink / raw)
  To: linuxppc-dev, galak

From: Grant Likely <grant.likely@secretlab.ca>

I can't see a good reason for eval board platform code to mess with the
ROOT_DEV value instead of using the default behaviour (so I'm writing
this patch to see if anyone will clue me in).

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/powerpc/platforms/52xx/efika.c          |    9 ---------
 arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
 arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    6 ------
 arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
 arch/powerpc/platforms/8xx/mpc885ads_setup.c |    2 --
 arch/powerpc/platforms/chrp/setup.c          |   10 ----------
 6 files changed, 0 insertions(+), 41 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index 4263158..0b1e60a 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -197,15 +197,6 @@ static void __init efika_setup_arch(void)
 {
 	rtas_initialize();
 
-#ifdef CONFIG_BLK_DEV_INITRD
-	initrd_below_start_ok = 1;
-
-	if (initrd_start)
-		ROOT_DEV = Root_RAM0;
-	else
-#endif
-		ROOT_DEV = Root_SDA2;	/* sda2 (sda1 is for the kernel) */
-
 	efika_pcisetup();
 
 #ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index e11d27f..48fc662 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -136,18 +136,6 @@ static void __init lite5200_setup_arch(void)
 		of_node_put(np);
 	}
 #endif
-
-#ifdef CONFIG_BLK_DEV_INITRD
-	if (initrd_start)
-		ROOT_DEV = Root_RAM0;
-	else
-#endif
-#ifdef  CONFIG_ROOT_NFS
-		ROOT_DEV = Root_NFS;
-#else
-		ROOT_DEV = Root_HDA1;
-#endif
-
 }
 
 static void lite5200_show_cpuinfo(struct seq_file *m)
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 4008795..a1af287 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -575,12 +575,6 @@ static void __init mpc82xx_ads_setup_arch(void)
 	of_node_put(np);
 #endif
 
-#ifdef  CONFIG_ROOT_NFS
-	ROOT_DEV = Root_NFS;
-#else
-	ROOT_DEV = Root_HDA1;
-#endif
-
 	if (ppc_md.progress)
 		ppc_md.progress("mpc82xx_ads_setup_arch(), finish", 0);
 }
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index 8f64f48..c712ce0 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -256,8 +256,6 @@ static void __init mpc86xads_setup_arch(void)
 	cpm_reset();
 
 	mpc86xads_board_setup();
-
-	ROOT_DEV = Root_NFS;
 }
 
 static int __init mpc86xads_probe(void)
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index a1dab4c..4c67cf6 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -408,8 +408,6 @@ static void __init mpc885ads_setup_arch(void)
 	cpm_reset();
 
 	mpc885ads_board_setup();
-
-	ROOT_DEV = Root_NFS;
 }
 
 static int __init mpc885ads_probe(void)
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 96498ad..5930626 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -290,16 +290,6 @@ void __init chrp_setup_arch(void)
 		ppc_md.set_rtc_time	= rtas_set_rtc_time;
 	}
 
-#ifdef CONFIG_BLK_DEV_INITRD
-	/* this is fine for chrp */
-	initrd_below_start_ok = 1;
-
-	if (initrd_start)
-		ROOT_DEV = Root_RAM0;
-	else
-#endif
-		ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
-
 	/* On pegasos, enable the L2 cache if not already done by OF */
 	pegasos_set_l2cr();
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 15:12 [PATCH] Eval boards should not need to mess with ROOT_DEV Grant Likely
@ 2007-10-08 15:27 ` Kumar Gala
  2007-10-08 19:03   ` Grant Likely
  0 siblings, 1 reply; 10+ messages in thread
From: Kumar Gala @ 2007-10-08 15:27 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev


On Oct 8, 2007, at 10:12 AM, Grant Likely wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
>
> I can't see a good reason for eval board platform code to mess with  
> the
> ROOT_DEV value instead of using the default behaviour (so I'm writing
> this patch to see if anyone will clue me in).
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
>  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
>  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
>  arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    6 ------
>  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
>  arch/powerpc/platforms/8xx/mpc885ads_setup.c |    2 --
>  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
>  6 files changed, 0 insertions(+), 41 deletions(-)

FYI, 82xx_ads and 885ads don't have this issue in my tree based on  
fixes from Scott.

- k

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 15:27 ` Kumar Gala
@ 2007-10-08 19:03   ` Grant Likely
  2007-10-08 19:41     ` Kumar Gala
  2007-10-08 21:06     ` Grant Likely
  0 siblings, 2 replies; 10+ messages in thread
From: Grant Likely @ 2007-10-08 19:03 UTC (permalink / raw)
  To: Kumar Gala, Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev

On 10/8/07, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Oct 8, 2007, at 10:12 AM, Grant Likely wrote:
>
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > I can't see a good reason for eval board platform code to mess with
> > the
> > ROOT_DEV value instead of using the default behaviour (so I'm writing
> > this patch to see if anyone will clue me in).
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> >
> >  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
> >  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
> >  arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    6 ------
> >  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
> >  arch/powerpc/platforms/8xx/mpc885ads_setup.c |    2 --
> >  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
> >  6 files changed, 0 insertions(+), 41 deletions(-)
>
> FYI, 82xx_ads and 885ads don't have this issue in my tree based on
> fixes from Scott.

So, if I respin this patch to exclude those two platforms, will you
merge it?  (Efika and Lite5200 only have it because they were cloned
from CHRP.

Powermac and pseries also do this weirdness.  Should it be removed
from there too?

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 19:03   ` Grant Likely
@ 2007-10-08 19:41     ` Kumar Gala
  2007-10-08 20:42       ` Linas Vepstas
  2007-10-08 20:56       ` Benjamin Herrenschmidt
  2007-10-08 21:06     ` Grant Likely
  1 sibling, 2 replies; 10+ messages in thread
From: Kumar Gala @ 2007-10-08 19:41 UTC (permalink / raw)
  To: Grant Likely; +Cc: Paul Mackerras, linuxppc-dev


On Oct 8, 2007, at 2:03 PM, Grant Likely wrote:

> On 10/8/07, Kumar Gala <galak@kernel.crashing.org> wrote:
>>
>> On Oct 8, 2007, at 10:12 AM, Grant Likely wrote:
>>
>>> From: Grant Likely <grant.likely@secretlab.ca>
>>>
>>> I can't see a good reason for eval board platform code to mess with
>>> the
>>> ROOT_DEV value instead of using the default behaviour (so I'm  
>>> writing
>>> this patch to see if anyone will clue me in).
>>>
>>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>>> ---
>>>
>>>  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
>>>  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
>>>  arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    6 ------
>>>  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
>>>  arch/powerpc/platforms/8xx/mpc885ads_setup.c |    2 --
>>>  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
>>>  6 files changed, 0 insertions(+), 41 deletions(-)
>>
>> FYI, 82xx_ads and 885ads don't have this issue in my tree based on
>> fixes from Scott.
>
> So, if I respin this patch to exclude those two platforms, will you
> merge it?  (Efika and Lite5200 only have it because they were cloned
> from CHRP.
>
> Powermac and pseries also do this weirdness.  Should it be removed
> from there too?

We need benh to make a comment about powermac.

I think its ok to remove everywhere but we should see if he has any  
issue.

- k

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 19:41     ` Kumar Gala
@ 2007-10-08 20:42       ` Linas Vepstas
  2007-10-08 21:43         ` Linas Vepstas
  2007-10-08 20:56       ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 10+ messages in thread
From: Linas Vepstas @ 2007-10-08 20:42 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras

On Mon, Oct 08, 2007 at 02:41:54PM -0500, Kumar Gala wrote:
> 
> On Oct 8, 2007, at 2:03 PM, Grant Likely wrote:
> 
> >>> I can't see a good reason for eval board platform code to mess with
> >>> the
> >>> ROOT_DEV value instead of using the default behaviour (so I'm  
> >
> > Powermac and pseries also do this weirdness.  Should it be removed
> > from there too?
> 
> We need benh to make a comment about powermac.
> 
> I think its ok to remove everywhere but we should see if he has any  
> issue.

Ack. I see no problems in removing it.

--linas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 19:41     ` Kumar Gala
  2007-10-08 20:42       ` Linas Vepstas
@ 2007-10-08 20:56       ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2007-10-08 20:56 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras


On Mon, 2007-10-08 at 14:41 -0500, Kumar Gala wrote:
> > Powermac and pseries also do this weirdness.  Should it be removed
> > from there too?
> 
> We need benh to make a comment about powermac.
> 
> I think its ok to remove everywhere but we should see if he has any  
> issue.

PowerMac has some weirdo auto-detection code for root... I don't want to
remove it just yet.

Ben

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 19:03   ` Grant Likely
  2007-10-08 19:41     ` Kumar Gala
@ 2007-10-08 21:06     ` Grant Likely
  2007-10-08 21:57       ` Arnd Bergmann
  1 sibling, 1 reply; 10+ messages in thread
From: Grant Likely @ 2007-10-08 21:06 UTC (permalink / raw)
  To: Kumar Gala, Paul Mackerras, Benjamin Herrenschmidt, Geoff Levand
  Cc: linuxppc-dev

On 10/8/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 10/8/07, Kumar Gala <galak@kernel.crashing.org> wrote:
> >
> > On Oct 8, 2007, at 10:12 AM, Grant Likely wrote:
> >
> > > From: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > I can't see a good reason for eval board platform code to mess with
> > > the
> > > ROOT_DEV value instead of using the default behaviour (so I'm writing
> > > this patch to see if anyone will clue me in).
> > >
> > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > ---
> > >
> > >  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
> > >  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
> > >  arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    6 ------
> > >  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
> > >  arch/powerpc/platforms/8xx/mpc885ads_setup.c |    2 --
> > >  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
> > >  6 files changed, 0 insertions(+), 41 deletions(-)
> >
> > FYI, 82xx_ads and 885ads don't have this issue in my tree based on
> > fixes from Scott.
>
> So, if I respin this patch to exclude those two platforms, will you
> merge it?  (Efika and Lite5200 only have it because they were cloned
> from CHRP.
>
> Powermac and pseries also do this weirdness.  Should it be removed
> from there too?

Oh, and cell does too.  Geoff, does cell support really need to do this:
(in cell/setup.c and celleb/setup.c).
	if (ROOT_DEV == 0) {
		printk("No ramdisk, default root is /dev/hda2\n");
		ROOT_DEV = Root_HDA2;
	}

If not; I'll spin a patch to drop it.

Thanks,
g.



>
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 20:42       ` Linas Vepstas
@ 2007-10-08 21:43         ` Linas Vepstas
  0 siblings, 0 replies; 10+ messages in thread
From: Linas Vepstas @ 2007-10-08 21:43 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras

On Mon, Oct 08, 2007 at 03:42:21PM -0500, Linas Vepstas wrote:
> On Mon, Oct 08, 2007 at 02:41:54PM -0500, Kumar Gala wrote:
> > 
> > On Oct 8, 2007, at 2:03 PM, Grant Likely wrote:
> > 
> > >>> I can't see a good reason for eval board platform code to mess with
> > >>> the
> > >>> ROOT_DEV value instead of using the default behaviour (so I'm  
> > >
> > > Powermac and pseries also do this weirdness.  Should it be removed
> > > from there too?
> > 
> > We need benh to make a comment about powermac.
> > 
> > I think its ok to remove everywhere but we should see if he has any  
> > issue.
> 
> Ack. I see no problems in removing it.

Err. I meant my comment to be of limited scope: "for pseries". 
I know nothing of other platforms.

--linas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 21:06     ` Grant Likely
@ 2007-10-08 21:57       ` Arnd Bergmann
  2007-10-08 22:19         ` Grant Likely
  0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2007-10-08 21:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras

On Monday 08 October 2007, Grant Likely wrote:
> Oh, and cell does too. =A0Geoff, does cell support really need to do this:
> (in cell/setup.c and celleb/setup.c).
> =A0=A0=A0=A0=A0=A0=A0=A0if (ROOT_DEV =3D=3D 0) {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0printk("No ramdisk, defau=
lt root is /dev/hda2\n");
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0ROOT_DEV =3D Root_HDA2;
> =A0=A0=A0=A0=A0=A0=A0=A0}
>=20
> If not; I'll spin a patch to drop it.

Cell certainly doesn't need this, I believe this is an artifact from
copying from pseries, so please kill it when you do the patch.

	Arnd <><

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
  2007-10-08 21:57       ` Arnd Bergmann
@ 2007-10-08 22:19         ` Grant Likely
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2007-10-08 22:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras

On 10/8/07, Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday 08 October 2007, Grant Likely wrote:
> > Oh, and cell does too. Geoff, does cell support really need to do this:
> > (in cell/setup.c and celleb/setup.c).
> > if (ROOT_DEV == 0) {
> > printk("No ramdisk, default root is /dev/hda2\n");
> > ROOT_DEV = Root_HDA2;
> > }
> >
> > If not; I'll spin a patch to drop it.
>
> Cell certainly doesn't need this, I believe this is an artifact from
> copying from pseries, so please kill it when you do the patch.

Cool; Looks like I'm killing it from all platforms except powermac.
Rolling patch now...

Cheers,
g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-10-08 22:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 15:12 [PATCH] Eval boards should not need to mess with ROOT_DEV Grant Likely
2007-10-08 15:27 ` Kumar Gala
2007-10-08 19:03   ` Grant Likely
2007-10-08 19:41     ` Kumar Gala
2007-10-08 20:42       ` Linas Vepstas
2007-10-08 21:43         ` Linas Vepstas
2007-10-08 20:56       ` Benjamin Herrenschmidt
2007-10-08 21:06     ` Grant Likely
2007-10-08 21:57       ` Arnd Bergmann
2007-10-08 22:19         ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).