LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-usb-devel] [PATCH] USB: Add frame_no big endian OHCI quirk
From: Dale Farnsworth @ 2007-10-08 18:52 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: david-b, linuxppc-dev, linux-usb-devel
In-Reply-To: <20071008184140.GA30470@ru.mvista.com>

On Mon, Oct 08, 2007 at 10:41:40PM +0400, Valentine Barshak wrote:
> Add OHCI big endian frame_no quirk.
> The frame_no value stored in the HCCA is a 16 bit field 
> at a specific offset, but since not all CPUs can do 16-bit
> memory accesses it's used as a 32 bit field.
> And that's why big-endian OHCI will shift 16 bits,
> unless the spec is not followed. Currently there's one MPC52xx
> platform that doesn't need the shift. This case is hanled
> using big endian frame_no quirk.
> 
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>

Acked-by: Dale Farnsworth <dale@farnsworth.org>

^ permalink raw reply

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Grant Likely @ 2007-10-08 19:03 UTC (permalink / raw)
  To: Kumar Gala, Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <D6497F34-ECE1-481E-B969-E7DDC60BAAFD@kernel.crashing.org>

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

* Re: [RFC][PATCH] Move TASK_SIZE to 0xc0000000 for ppc32
From: Scott Wood @ 2007-10-08 19:15 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Pantelis Antoniou, Paul Mackerras
In-Reply-To: <Pine.LNX.4.64.0710081242280.10079@blarg.am.freescale.net>

Kumar Gala wrote:
> Guys,
> 
> Here's a cut at a patch that cleans up the TASK_SIZE issue.  We now have
> TASK_SIZE @ 0xc0000000 for everything except PREP and use PAGE_OFFSET in
> SW TLB handlers.  I'm assuming 8xx will get a cleanup patch from
> PAGE_OFFSET testing (Dan :).

I'd rather this patch exclude 8xx along with PReP for now; the 8xx TLB 
handlers could be made to accept arbitrary task sizes, but not without 
slightly slowing them down (not that they're currently optimal -- IIUC, 
using the hardware tablewalk assist is expensive due to serialization on 
mtspr, and it doesn't really do anything that rlwimi can't do).  I'm not 
sure it's worth it -- does anyone really need more than 2GB userspace on 
an 8xx?

At the very least, we should have the 8xx patch in place before turning 
it on.

-Scott

^ permalink raw reply

* Re: [PATCH 2/3] [POWERPC] Add AMCC Kilauea eval board support to platforms/40x
From: Olof Johansson @ 2007-10-08 19:34 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200710081108.51625.sr@denx.de>

Hi,

On Mon, Oct 08, 2007 at 11:08:51AM +0200, Stefan Roese wrote:
> This patch adds basic support for the new 405EX and the AMCC eval board
> Kilauea to arch/powerpc.

[...]

> +config KILAUEA
> +	bool "Kilauea"
> +	depends on 40x
> +	default y
> +	select 405EX
> +	help
> +	  This option enables support for the AMCC PPC405EX evaluation board.
> +
>  #config REDWOOD_5
>  #	bool "Redwood-5"
>  #	depends on 40x
> @@ -89,14 +97,17 @@ config 403GCX
>  	#depends on OAK
>  	select IBM405_ERR51
>  
> +config 405EP
> +	bool
> +
> +config 405EX
> +	bool
> +

Do you really need config options for 405EP/EX? I don't seem them used anywhere
else in the code (and it's also contradictory to the whole new multiplatform way
of looking at stuff :).

I know the 405/440 is still somewhat #ifdef:ed on the cpu here and there, but since
this doesn't add any such code I don't see a need for the config options?


-Olof

^ permalink raw reply

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Kumar Gala @ 2007-10-08 19:41 UTC (permalink / raw)
  To: Grant Likely; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <fa686aa40710081203k13f921dcm4542299c0ecb401@mail.gmail.com>


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

* Re: [linux-usb-devel] [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: David Brownell @ 2007-10-08 19:45 UTC (permalink / raw)
  To: vbarshak, galak; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <470A6C07.3020805@ru.mvista.com>

> >> However, based on one other post, I suspect at least one Freescale
> >> part will need to declare a chip quirk for this case.
> > 
> > Which Freescale part do you think needs this?
>
> I've looked at drivers/usb/host/Kconfig
> It seems to be MPC52xx.
> David, is that the one you mentioned?

I wasn't the one to mention it.  It was someone else in this thread.

^ permalink raw reply

* [PATCH 2/2] Remove empty ppc_md.setup_arch hooks.
From: Grant Likely @ 2007-10-08 20:37 UTC (permalink / raw)
  To: jwboyer, linuxppc-dev
In-Reply-To: <20071008203754.12243.1712.stgit@trillian.cg.shawcable.net>

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

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

 arch/powerpc/platforms/40x/virtex.c  |    5 -----
 arch/powerpc/platforms/40x/walnut.c  |    5 -----
 arch/powerpc/platforms/44x/bamboo.c  |    5 -----
 arch/powerpc/platforms/44x/ebony.c   |    5 -----
 arch/powerpc/platforms/44x/sequoia.c |    5 -----
 5 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index b52aa94..14bbc32 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -36,14 +36,9 @@ static int __init virtex_probe(void)
 	return 1;
 }
 
-static void __init virtex_setup_arch(void)
-{
-}
-
 define_machine(virtex) {
 	.name			= "Xilinx Virtex",
 	.probe			= virtex_probe,
-	.setup_arch		= virtex_setup_arch,
 	.init_IRQ		= xilinx_intc_init_tree,
 	.get_irq		= xilinx_intc_get_irq,
 	.calibrate_decr		= generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index c17fdf2..eb0c136 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -53,14 +53,9 @@ static int __init walnut_probe(void)
 	return 1;
 }
 
-static void __init walnut_setup_arch(void)
-{
-}
-
 define_machine(walnut) {
 	.name			= "Walnut",
 	.probe			= walnut_probe,
-	.setup_arch		= walnut_setup_arch,
 	.progress		= udbg_progress,
 	.init_IRQ		= uic_init_tree,
 	.get_irq		= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index 9bc45de..470e1a3 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -50,14 +50,9 @@ static int __init bamboo_probe(void)
 	return 1;
 }
 
-static void __init bamboo_setup_arch(void)
-{
-}
-
 define_machine(bamboo) {
 	.name 				= "Bamboo",
 	.probe 				= bamboo_probe,
-	.setup_arch 		= bamboo_setup_arch,
 	.progress 			= udbg_progress,
 	.init_IRQ 			= uic_init_tree,
 	.get_irq 			= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 5a7fec8..40e18fc 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -57,14 +57,9 @@ static int __init ebony_probe(void)
 	return 1;
 }
 
-static void __init ebony_setup_arch(void)
-{
-}
-
 define_machine(ebony) {
 	.name			= "Ebony",
 	.probe			= ebony_probe,
-	.setup_arch		= ebony_setup_arch,
 	.progress		= udbg_progress,
 	.init_IRQ		= uic_init_tree,
 	.get_irq		= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 7d0d9d5..30700b3 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -50,14 +50,9 @@ static int __init sequoia_probe(void)
 	return 1;
 }
 
-static void __init sequoia_setup_arch(void)
-{
-}
-
 define_machine(sequoia) {
 	.name 				= "Sequoia",
 	.probe 				= sequoia_probe,
-	.setup_arch			= sequoia_setup_arch,
 	.progress 			= udbg_progress,
 	.init_IRQ 			= uic_init_tree,
 	.get_irq 			= uic_get_irq,

^ permalink raw reply related

* [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided.
From: Grant Likely @ 2007-10-08 20:37 UTC (permalink / raw)
  To: jwboyer, linuxppc-dev

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

This allows platforms which don't have anything to do at setup_arch time
(like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook.

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

 arch/powerpc/kernel/setup_32.c |    3 ++-
 arch/powerpc/kernel/setup_64.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7474502..cd870a8 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 	if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
 
 	paging_init();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3089eae..008ab68 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 
 	paging_init();
 	ppc64_boot_msg(0x15, "Setup Done");

^ permalink raw reply related

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Linas Vepstas @ 2007-10-08 20:42 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <27C642CB-ACC0-4E3E-85AA-8319F56364EB@kernel.crashing.org>

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

* Re: [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided.
From: Kumar Gala @ 2007-10-08 20:45 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20071008203754.12243.1712.stgit@trillian.cg.shawcable.net>


On Oct 8, 2007, at 3:37 PM, Grant Likely wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
>
> This allows platforms which don't have anything to do at setup_arch  
> time
> (like a bunch of the 4xx platforms) to eliminate an empty  
> setup_arch hook.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---

Can you add a comment to include/asm-powerpc/machdep.h to state that  
setup_arch() /* Optional, may be NULL */

We're a bit inconsistent here but would be good to make changes be  
correct.

- k

^ permalink raw reply

* Re: [POWERPC 03/15] [POWERPC] TQM5200 board support
From: Grant Likely @ 2007-10-08 20:48 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, tech-denx, Detlev Zundel, Marian Balakowicz
In-Reply-To: <fa686aa40710080054l4099c78cxb4817c413696e569@mail.gmail.com>

On 10/8/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 10/8/07, Wolfgang Denk <wd@denx.de> wrote:
> > In message <fa686aa40710072321g3494b243w341e2b09117c3695@mail.gmail.com> you wrote:
> > > Lite5200 touches it because firmware does *not* do the right thing at
> > > the moment.
> >
> > Why don't we fix it in U-Boot, then, and get rid of this in Linux?
>
> Mostly because I haven't gotten to it yet.  :-/

Actually, it's more than that.  I don't want to force users to upgrade
their firmware on the lite5200.  Linux boots on it fine now with old
firmware (using cuimage), it should continue to boot.  Doing board
specific fixups at Linux setup_arch time to work around
old/buggy/not-quite-what-we-want firmware is reasonable.  We must do
this on the Efika too.

Cheers,
g.

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

^ permalink raw reply

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Benjamin Herrenschmidt @ 2007-10-08 20:56 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <27C642CB-ACC0-4E3E-85AA-8319F56364EB@kernel.crashing.org>


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

* [PATCH v2] Only call ppc_md.setup_arch() if it is provided.
From: Grant Likely @ 2007-10-08 20:58 UTC (permalink / raw)
  To: jwboyer, linuxppc-dev, galak

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

This allows platforms which don't have anything to do at setup_arch time
(like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook.

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

 arch/powerpc/kernel/setup_32.c |    3 ++-
 arch/powerpc/kernel/setup_64.c |    3 ++-
 include/asm-powerpc/machdep.h  |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7474502..cd870a8 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 	if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
 
 	paging_init();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3089eae..008ab68 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 
 	paging_init();
 	ppc64_boot_msg(0x15, "Setup Done");
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 71c6e7e..cc7c17f 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -99,7 +99,7 @@ struct machdep_calls {
 #endif /* CONFIG_PPC64 */
 
 	int		(*probe)(void);
-	void		(*setup_arch)(void);
+	void		(*setup_arch)(void); /* Optional, may be NULL */
 	void		(*init_early)(void);
 	/* Optional, may be NULL. */
 	void		(*show_cpuinfo)(struct seq_file *m);

^ permalink raw reply related

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Grant Likely @ 2007-10-08 21:06 UTC (permalink / raw)
  To: Kumar Gala, Paul Mackerras, Benjamin Herrenschmidt, Geoff Levand
  Cc: linuxppc-dev
In-Reply-To: <fa686aa40710081203k13f921dcm4542299c0ecb401@mail.gmail.com>

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

* [PATCH 1/3] mpc8272ads: Remove muram from the CPM reg property.
From: Scott Wood @ 2007-10-08 21:08 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-dev

This is described by the muram node now.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/boot/dts/mpc8272ads.dts |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 188179d..7285ca1 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -121,7 +121,7 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
-			reg = <119c0 30 0 2000>;
+			reg = <119c0 30>;
 			ranges;
 
 			muram@0 {
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 3/3] mpc85xx: Add cpm nodes for 8541/8555 CDS
From: Scott Wood @ 2007-10-08 21:08 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-dev
In-Reply-To: <20071008210829.GA24428@loki.buserror.net>

We don't use any CPM devices on these boards, but the muram node on these
chips is different from the 8560, so it's helpful to people working with
custom boards based on these chips.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/boot/dts/mpc8541cds.dts |   36 ++++++++++++++++++++++++++++++++++
 arch/powerpc/boot/dts/mpc8555cds.dts |   36 ++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 6633e07..f3f4d79 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -145,6 +145,42 @@
 			device_type = "open-pic";
                         big-endian;
 		};
+
+		cpm@919c0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8541-cpm", "fsl,cpm2";
+			reg = <919c0 30>;
+			ranges;
+
+			muram@80000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 80000 10000>;
+
+				data@0 {
+					compatible = "fsl,cpm-muram-data";
+					reg = <0 2000 9000 1000>;
+				};
+			};
+
+			brg@919f0 {
+				compatible = "fsl,mpc8541-brg",
+				             "fsl,cpm2-brg",
+				             "fsl,cpm-brg";
+				reg = <919f0 10 915f0 10>;
+			};
+
+			cpmpic: pic@90c00 {
+				interrupt-controller;
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				interrupts = <2e 2>;
+				interrupt-parent = <&mpic>;
+				reg = <90c00 80>;
+				compatible = "fsl,mpc8541-cpm-pic", "fsl,cpm2-pic";
+			};
+		};
 	};
 
 	pci1: pci@e0008000 {
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 9919929..57029cc 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -145,6 +145,42 @@
 			device_type = "open-pic";
                         big-endian;
 		};
+
+		cpm@919c0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8555-cpm", "fsl,cpm2";
+			reg = <919c0 30>;
+			ranges;
+
+			muram@80000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 80000 10000>;
+
+				data@0 {
+					compatible = "fsl,cpm-muram-data";
+					reg = <0 2000 9000 1000>;
+				};
+			};
+
+			brg@919f0 {
+				compatible = "fsl,mpc8555-brg",
+				             "fsl,cpm2-brg",
+				             "fsl,cpm-brg";
+				reg = <919f0 10 915f0 10>;
+			};
+
+			cpmpic: pic@90c00 {
+				interrupt-controller;
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				interrupts = <2e 2>;
+				interrupt-parent = <&mpic>;
+				reg = <90c00 80>;
+				compatible = "fsl,mpc8555-cpm-pic", "fsl,cpm2-pic";
+			};
+		};
 	};
 
 	pci1: pci@e0008000 {
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 2/3] mpc85xx: Convert mpc8560ads to the new CPM binding.
From: Scott Wood @ 2007-10-08 21:08 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-dev
In-Reply-To: <20071008210829.GA24428@loki.buserror.net>

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/boot/dts/mpc8560ads.dts      |   82 ++++++++-------
 arch/powerpc/platforms/85xx/Kconfig       |    1 +
 arch/powerpc/platforms/85xx/mpc85xx_ads.c |  167 +++++++++++++++-------------
 3 files changed, 134 insertions(+), 116 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 5577ec1..6b362f8 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -138,15 +138,31 @@
 			device_type = "open-pic";
 		};
 
-		cpm@e0000000 {
+		cpm@919c0 {
 			#address-cells = <1>;
 			#size-cells = <1>;
-			device_type = "cpm";
-			model = "CPM2";
-			ranges = <0 0 c0000>;
-			reg = <80000 40000>;
-			command-proc = <919c0>;
-			brg-frequency = <9d5b340>;
+			compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
+			reg = <919c0 30>;
+			ranges;
+
+			muram@80000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 80000 10000>;
+
+				data@0 {
+					compatible = "fsl,cpm-muram-data";
+					reg = <0 4000 9000 2000>;
+				};
+			};
+
+			brg@919f0 {
+				compatible = "fsl,mpc8560-brg",
+				             "fsl,cpm2-brg",
+				             "fsl,cpm-brg";
+				reg = <919f0 10 915f0 10>;
+				clock-frequency = <d#165000000>;
+			};
 
 			cpmpic: pic@90c00 {
 				interrupt-controller;
@@ -155,43 +171,38 @@
 				interrupts = <2e 2>;
 				interrupt-parent = <&mpic>;
 				reg = <90c00 80>;
-				device_type = "cpm-pic";
+				compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
 			};
 
-			scc@91a00 {
+			serial@91a00 {
 				device_type = "serial";
-				compatible = "cpm_uart";
-				model = "SCC";
-				device-id = <1>;
+				compatible = "fsl,mpc8560-scc-uart",
+				             "fsl,cpm2-scc-uart";
 				reg = <91a00 20 88000 100>;
-				clock-setup = <00ffffff 0>;
-				rx-clock = <1>;
-				tx-clock = <1>;
+				fsl,cpm-brg = <1>;
+				fsl,cpm-command = <00800000>;
 				current-speed = <1c200>;
 				interrupts = <28 8>;
 				interrupt-parent = <&cpmpic>;
 			};
 
-			scc@91a20 {
+			serial@91a20 {
 				device_type = "serial";
-				compatible = "cpm_uart";
-				model = "SCC";
-				device-id = <2>;
+				compatible = "fsl,mpc8560-scc-uart",
+				             "fsl,cpm2-scc-uart";
 				reg = <91a20 20 88100 100>;
-				clock-setup = <ff00ffff 90000>;
-				rx-clock = <2>;
-				tx-clock = <2>;
+				fsl,cpm-brg = <2>;
+				fsl,cpm-command = <04a00000>;
 				current-speed = <1c200>;
 				interrupts = <29 8>;
 				interrupt-parent = <&cpmpic>;
 			};
 
-			fcc@91320 {
+			ethernet@91320 {
 				device_type = "network";
-				compatible = "fs_enet";
-				model = "FCC";
-				device-id = <2>;
-				reg = <91320 20 88500 100 913a0 30>;
+				compatible = "fsl,mpc8560-fcc-enet",
+				             "fsl,cpm2-fcc-enet";
+				reg = <91320 20 88500 100 913b0 1>;
 				/*
 				 * mac-address is deprecated and will be removed
 				 * in 2.6.25.  Only recent versions of
@@ -199,20 +210,17 @@
 				 */
 				mac-address = [ 00 00 00 00 00 00 ];
 				local-mac-address = [ 00 00 00 00 00 00 ];
-				clock-setup = <ff00ffff 250000>;
-				rx-clock = <15>;
-				tx-clock = <16>;
+				fsl,cpm-command = <16200300>;
 				interrupts = <21 8>;
 				interrupt-parent = <&cpmpic>;
 				phy-handle = <&phy2>;
 			};
 
-			fcc@91340 {
+			ethernet@91340 {
 				device_type = "network";
-				compatible = "fs_enet";
-				model = "FCC";
-				device-id = <3>;
-				reg = <91340 20 88600 100 913d0 30>;
+				compatible = "fsl,mpc8560-fcc-enet",
+				             "fsl,cpm2-fcc-enet";
+				reg = <91340 20 88600 100 913d0 1>;
 				/*
 				 * mac-address is deprecated and will be removed
 				 * in 2.6.25.  Only recent versions of
@@ -220,9 +228,7 @@
 				 */
 				mac-address = [ 00 00 00 00 00 00 ];
 				local-mac-address = [ 00 00 00 00 00 00 ];
-				clock-setup = <ffff00ff 3700>;
-				rx-clock = <17>;
-				tx-clock = <18>;
+				fsl,cpm-command = <1a400300>;
 				interrupts = <22 8>;
 				interrupt-parent = <&cpmpic>;
 				phy-handle = <&phy3>;
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index b8476b2..439f815 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -12,6 +12,7 @@ config MPC8540_ADS
 config MPC8560_ADS
 	bool "Freescale MPC8560 ADS"
 	select DEFAULT_UIMAGE
+	select PPC_CPM_NEW_BINDING
 	help
 	  This option enables support for the MPC 8560 ADS board
 
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 378a244..509d46b 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -17,13 +17,13 @@
 #include <linux/kdev_t.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
 #include <asm/mpc85xx.h>
-#include <asm/prom.h>
 #include <asm/mpic.h>
 #include <mm/mmu_decl.h>
 #include <asm/udbg.h>
@@ -32,10 +32,8 @@
 #include <sysdev/fsl_pci.h>
 
 #ifdef CONFIG_CPM2
-#include <linux/fs_enet_pd.h>
 #include <asm/cpm2.h>
 #include <sysdev/cpm2_pic.h>
-#include <asm/fs_pd.h>
 #endif
 
 #ifdef CONFIG_PCI
@@ -95,10 +93,10 @@ static void __init mpc85xx_ads_pic_init(void)
 
 #ifdef CONFIG_CPM2
 	/* Setup CPM2 PIC */
-	np = of_find_node_by_type(NULL, "cpm-pic");
+	np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
 	if (np == NULL) {
-		printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
-                return;
+		printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
+		return;
 	}
 	irq = irq_of_parse_and_map(np, 0);
 
@@ -111,81 +109,75 @@ static void __init mpc85xx_ads_pic_init(void)
  * Setup the architecture
  */
 #ifdef CONFIG_CPM2
-void init_fcc_ioports(struct fs_platform_info *fpi)
+struct cpm_pin {
+	int port, pin, flags;
+};
+
+static struct cpm_pin mpc8560_ads_pins[] = {
+	/* SCC1 */
+	{3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
+	{3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+	/* SCC2 */
+	{3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+	/* FCC2 */
+	{1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
+	{1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK14 */
+	{2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK13 */
+
+	/* FCC3 */
+	{1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 7, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 14, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{2, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK16 */
+	{2, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK15 */
+};
+
+static void __init init_ioports(void)
 {
-	struct io_port *io = cpm2_map(im_ioport);
-	int fcc_no = fs_get_fcc_index(fpi->fs_no);
-	int target;
-	u32 tempval;
-
-	switch(fcc_no) {
-	case 1:
-		tempval = in_be32(&io->iop_pdirb);
-		tempval &= ~PB2_DIRB0;
-		tempval |= PB2_DIRB1;
-		out_be32(&io->iop_pdirb, tempval);
-
-		tempval = in_be32(&io->iop_psorb);
-		tempval &= ~PB2_PSORB0;
-		tempval |= PB2_PSORB1;
-		out_be32(&io->iop_psorb, tempval);
-
-		tempval = in_be32(&io->iop_pparb);
-		tempval |= (PB2_DIRB0 | PB2_DIRB1);
-		out_be32(&io->iop_pparb, tempval);
-
-		target = CPM_CLK_FCC2;
-		break;
-	case 2:
-		tempval = in_be32(&io->iop_pdirb);
-		tempval &= ~PB3_DIRB0;
-		tempval |= PB3_DIRB1;
-		out_be32(&io->iop_pdirb, tempval);
-
-		tempval = in_be32(&io->iop_psorb);
-		tempval &= ~PB3_PSORB0;
-		tempval |= PB3_PSORB1;
-		out_be32(&io->iop_psorb, tempval);
-
-		tempval = in_be32(&io->iop_pparb);
-		tempval |= (PB3_DIRB0 | PB3_DIRB1);
-		out_be32(&io->iop_pparb, tempval);
-
-		tempval = in_be32(&io->iop_pdirc);
-		tempval |= PC3_DIRC1;
-		out_be32(&io->iop_pdirc, tempval);
-
-		tempval = in_be32(&io->iop_pparc);
-		tempval |= PC3_DIRC1;
-		out_be32(&io->iop_pparc, tempval);
-
-		target = CPM_CLK_FCC3;
-		break;
-	default:
-		printk(KERN_ERR "init_fcc_ioports: invalid FCC number\n");
-		return;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(mpc8560_ads_pins); i++) {
+		struct cpm_pin *pin = &mpc8560_ads_pins[i];
+		cpm2_set_pin(pin->port, pin->pin, pin->flags);
 	}
 
-	/* Port C has clocks......  */
-	tempval = in_be32(&io->iop_psorc);
-	tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
-	out_be32(&io->iop_psorc, tempval);
-
-	tempval = in_be32(&io->iop_pdirc);
-	tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
-	out_be32(&io->iop_pdirc, tempval);
-	tempval = in_be32(&io->iop_pparc);
-	tempval |= (PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
-	out_be32(&io->iop_pparc, tempval);
-
-	cpm2_unmap(io);
-
-	/* Configure Serial Interface clock routing.
-	 * First,  clear FCC bits to zero,
-	 * then set the ones we want.
-	 */
-	cpm2_clk_setup(target, fpi->clk_rx, CPM_CLK_RX);
-	cpm2_clk_setup(target, fpi->clk_tx, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK15, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK16, CPM_CLK_TX);
 }
 #endif
 
@@ -200,6 +192,7 @@ static void __init mpc85xx_ads_setup_arch(void)
 
 #ifdef CONFIG_CPM2
 	cpm2_reset();
+	init_ioports();
 #endif
 
 #ifdef CONFIG_PCI
@@ -231,6 +224,24 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
 	seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
 }
 
+static struct of_device_id __initdata of_bus_ids[] = {
+	{ .name = "soc", },
+	{ .type = "soc", },
+	{ .name = "cpm", },
+	{ .name = "localbus", },
+	{},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc85xx_ads))
+		return 0;
+
+	of_platform_bus_probe(NULL, of_bus_ids, NULL);
+	return 0;
+}
+device_initcall(declare_of_platform_devices);
+
 /*
  * Called very early, device-tree isn't unflattened
  */
-- 
1.5.3.4

^ permalink raw reply related

* bootwrapper: relative finddevice()
From: Scott Wood @ 2007-10-08 21:24 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org list

I'd like to expose flatdevtree's ability to do relative path lookups in 
ops, and I'd prefer to extend the existing finddevice method rather than 
add a new finddevice_rel.  However, I'm not very familiar with real OF 
-- how would one go about fixing its implementation?

-Scott

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Timur Tabi @ 2007-10-08 21:33 UTC (permalink / raw)
  To: Grant Likely; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <fa686aa40709251546p725e66dcsbc0483cadb3ec3fb@mail.gmail.com>

Looks like the problem is back:

   BOOTCC  arch/powerpc/boot/treeboot-walnut.o
Assembler messages:
Error: Internal assembler error for instruction icbt
Internal error, aborting at 
/tmp/crosstool/crosstool-0.42/build/powerpc-unknown-linux-gnu/gcc-4.0.2_e300-enabled-glibc-2.3.6/binutils-2.16.1-complete/gas/config/tc-ppc.c 
line 1314 in ppc_setup_opcodes
Please report this bug.
make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 2
make: *** [uImage] Error 2

Question: I'm building a kernel for the 8610.  Why is treeboot-walnut.c being 
compiled at all?

Grant Likely wrote:
> Building Paul's current powerpc branch with a ppc6xx compiler causes
> the following build failure:
> 
>   SYSMAP  System.map
>   BOOTCC  arch/powerpc/boot/treeboot-walnut.o
> {standard input}: Assembler messages:
> {standard input}:184: Error: Unrecognized opcode: `mfdcr'
> {standard input}:185: Error: Unrecognized opcode: `mfdcr'
> {standard input}:186: Error: Unrecognized opcode: `mfdcr'
> {standard input}:217: Error: Unrecognized opcode: `mtdcr'
> make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 1
> make: *** [uImage] Error 2
> 
> This is using ELDK 4.1:
> GNU assembler version 2.16.1 (powerpc-linux) using BFD version 2.16.1
> gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)
> 
> Cheers,
> g.
> 


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Linas Vepstas @ 2007-10-08 21:43 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20071008204221.GA11512@austin.ibm.com>

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

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Arnd Bergmann @ 2007-10-08 21:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras
In-Reply-To: <fa686aa40710081406w4aa751ewddb6a164bc070871@mail.gmail.com>

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

* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Grant Likely @ 2007-10-08 22:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <200710082357.13144.arnd@arndb.de>

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

* [PATCH 2/6] Remove empty ppc_md.setup_arch hooks.
From: Grant Likely @ 2007-10-08 22:24 UTC (permalink / raw)
  To: galak, paulus, arnd, linuxppc-dev
In-Reply-To: <20071008222445.25840.6561.stgit@trillian.cg.shawcable.net>

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

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

 arch/powerpc/platforms/40x/virtex.c  |    5 -----
 arch/powerpc/platforms/40x/walnut.c  |    5 -----
 arch/powerpc/platforms/44x/bamboo.c  |    5 -----
 arch/powerpc/platforms/44x/ebony.c   |    5 -----
 arch/powerpc/platforms/44x/sequoia.c |    5 -----
 5 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index b52aa94..14bbc32 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -36,14 +36,9 @@ static int __init virtex_probe(void)
 	return 1;
 }
 
-static void __init virtex_setup_arch(void)
-{
-}
-
 define_machine(virtex) {
 	.name			= "Xilinx Virtex",
 	.probe			= virtex_probe,
-	.setup_arch		= virtex_setup_arch,
 	.init_IRQ		= xilinx_intc_init_tree,
 	.get_irq		= xilinx_intc_get_irq,
 	.calibrate_decr		= generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index c17fdf2..eb0c136 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -53,14 +53,9 @@ static int __init walnut_probe(void)
 	return 1;
 }
 
-static void __init walnut_setup_arch(void)
-{
-}
-
 define_machine(walnut) {
 	.name			= "Walnut",
 	.probe			= walnut_probe,
-	.setup_arch		= walnut_setup_arch,
 	.progress		= udbg_progress,
 	.init_IRQ		= uic_init_tree,
 	.get_irq		= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index 9bc45de..470e1a3 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -50,14 +50,9 @@ static int __init bamboo_probe(void)
 	return 1;
 }
 
-static void __init bamboo_setup_arch(void)
-{
-}
-
 define_machine(bamboo) {
 	.name 				= "Bamboo",
 	.probe 				= bamboo_probe,
-	.setup_arch 		= bamboo_setup_arch,
 	.progress 			= udbg_progress,
 	.init_IRQ 			= uic_init_tree,
 	.get_irq 			= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 5a7fec8..40e18fc 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -57,14 +57,9 @@ static int __init ebony_probe(void)
 	return 1;
 }
 
-static void __init ebony_setup_arch(void)
-{
-}
-
 define_machine(ebony) {
 	.name			= "Ebony",
 	.probe			= ebony_probe,
-	.setup_arch		= ebony_setup_arch,
 	.progress		= udbg_progress,
 	.init_IRQ		= uic_init_tree,
 	.get_irq		= uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 7d0d9d5..30700b3 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -50,14 +50,9 @@ static int __init sequoia_probe(void)
 	return 1;
 }
 
-static void __init sequoia_setup_arch(void)
-{
-}
-
 define_machine(sequoia) {
 	.name 				= "Sequoia",
 	.probe 				= sequoia_probe,
-	.setup_arch			= sequoia_setup_arch,
 	.progress 			= udbg_progress,
 	.init_IRQ 			= uic_init_tree,
 	.get_irq 			= uic_get_irq,

^ permalink raw reply related

* [PATCH 3/6] Platforms shouldn't mess with ROOT_DEV
From: Grant Likely @ 2007-10-08 22:25 UTC (permalink / raw)
  To: galak, paulus, arnd, linuxppc-dev
In-Reply-To: <20071008222445.25840.6561.stgit@trillian.cg.shawcable.net>

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

There is no good reason for board platform code to mess with the ROOT_DEV.
Remove it from all in-tree platforms except powermac

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/8xx/mpc86xads_setup.c |    2 --
 arch/powerpc/platforms/cell/setup.c          |    5 -----
 arch/powerpc/platforms/celleb/setup.c        |    5 -----
 arch/powerpc/platforms/chrp/setup.c          |   10 ----------
 arch/powerpc/platforms/pseries/setup.c       |    5 -----
 7 files changed, 0 insertions(+), 48 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/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/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index db66542..3d679b1 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -161,11 +161,6 @@ static void __init cell_setup_arch(void)
 	/* init to some ~sane value until calibrate_delay() runs */
 	loops_per_jiffy = 50000000;
 
-	if (ROOT_DEV == 0) {
-		printk("No ramdisk, default root is /dev/hda2\n");
-		ROOT_DEV = Root_HDA2;
-	}
-
 	/* Find and initialize PCI host bridges */
 	init_pci_config_tokens();
 	find_and_init_phbs();
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 0f1dddb..1769d75 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -101,11 +101,6 @@ static void __init celleb_setup_arch(void)
 	/* init to some ~sane value until calibrate_delay() runs */
 	loops_per_jiffy = 50000000;
 
-	if (ROOT_DEV == 0) {
-		printk("No ramdisk, default root is /dev/hda2\n");
-		ROOT_DEV = Root_HDA2;
-	}
-
 #ifdef CONFIG_DUMMY_CONSOLE
 	conswitchp = &dummy_con;
 #endif
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();
 
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index f0b7146..fdb9b1c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -257,11 +257,6 @@ static void __init pSeries_setup_arch(void)
 	/* init to some ~sane value until calibrate_delay() runs */
 	loops_per_jiffy = 50000000;
 
-	if (ROOT_DEV == 0) {
-		printk("No ramdisk, default root is /dev/sda2\n");
-		ROOT_DEV = Root_SDA2;
-	}
-
 	fwnmi_init();
 
 	/* Find and initialize PCI host bridges */

^ permalink raw reply related

* [PATCH 5/6] MPC52xx: Trim includes on mpc5200 platform support code
From: Grant Likely @ 2007-10-08 22:25 UTC (permalink / raw)
  To: galak, paulus, arnd, linuxppc-dev
In-Reply-To: <20071008222445.25840.6561.stgit@trillian.cg.shawcable.net>

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

Drop unnecessary includes for MPC5200 based boards

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

 arch/powerpc/platforms/52xx/efika.c          |   21 ++-------------------
 arch/powerpc/platforms/52xx/lite5200.c       |   22 +---------------------
 arch/powerpc/platforms/52xx/mpc52xx_common.c |    4 +---
 arch/powerpc/platforms/52xx/mpc52xx_pic.c    |   12 +-----------
 4 files changed, 5 insertions(+), 54 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index 0b1e60a..e5bc493 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -9,33 +9,16 @@
  * kind, whether express or implied.
  */
 
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/reboot.h>
 #include <linux/init.h>
 #include <linux/utsrelease.h>
-#include <linux/seq_file.h>
-#include <linux/string.h>
-#include <linux/root_dev.h>
-#include <linux/initrd.h>
-#include <linux/timer.h>
 #include <linux/pci.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/sections.h>
-#include <asm/pci-bridge.h>
-#include <asm/pgtable.h>
-#include <asm/prom.h>
+#include <linux/of.h>
 #include <asm/time.h>
+#include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/rtas.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
 #include <asm/mpc52xx.h>
 
-
 #define EFIKA_PLATFORM_NAME "Efika"
 
 
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 6469813..c1aca5e 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -15,32 +15,12 @@
 
 #undef DEBUG
 
-#include <linux/stddef.h>
-#include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
 #include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-#include <linux/initrd.h>
-
-#include <asm/system.h>
-#include <asm/atomic.h>
+#include <linux/of.h>
 #include <asm/time.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
-#include <asm/ipic.h>
-#include <asm/irq.h>
-#include <asm/prom.h>
-#include <asm/udbg.h>
-#include <sysdev/fsl_soc.h>
-#include <asm/of_platform.h>
-
 #include <asm/mpc52xx.h>
 
 /* ************************************************************************
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 2dd415f..93e7869 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -13,10 +13,8 @@
 #undef DEBUG
 
 #include <linux/kernel.h>
-
+#include <linux/of_platform.h>
 #include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/of_platform.h>
 #include <asm/mpc52xx.h>
 
 
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 0f4ca8a..0cfcc42 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -18,19 +18,9 @@
 
 #undef DEBUG
 
-#include <linux/stddef.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/signal.h>
-#include <linux/delay.h>
 #include <linux/irq.h>
-#include <linux/hardirq.h>
-
+#include <linux/of.h>
 #include <asm/io.h>
-#include <asm/processor.h>
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/prom.h>
 #include <asm/mpc52xx.h>
 #include "mpc52xx_pic.h"
 

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox