LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 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 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: 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

* 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 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: [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

* [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

* [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

* 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

* 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: [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: [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] 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: [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

* [PATCH] USB: Add frame_no big endian OHCI quirk
From: Valentine Barshak @ 2007-10-08 18:41 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david-b, linux-usb-devel
In-Reply-To: <20071008165436.GA19653@ru.mvista.com>

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>
---
 drivers/usb/host/ohci-ppc-of.c  |    5 ++++-
 drivers/usb/host/ohci-ppc-soc.c |    5 +++++
 drivers/usb/host/ohci.h         |   13 ++++++-------
 3 files changed, 15 insertions(+), 8 deletions(-)

diff -pruN linux-2.6.orig/drivers/usb/host/ohci.h linux-2.6/drivers/usb/host/ohci.h
--- linux-2.6.orig/drivers/usb/host/ohci.h	2007-10-08 16:30:28.000000000 +0400
+++ linux-2.6/drivers/usb/host/ohci.h	2007-10-08 20:39:28.000000000 +0400
@@ -398,6 +398,7 @@ struct ohci_hcd {
 #define	OHCI_QUIRK_BE_MMIO	0x10			/* BE registers */
 #define	OHCI_QUIRK_ZFMICRO	0x20			/* Compaq ZFMicro chipset*/
 #define	OHCI_QUIRK_NEC		0x40			/* lost interrupts */
+#define	OHCI_QUIRK_FRAME_NO	0x80			/* no big endian frame_no shift */
 	// there are also chip quirks/bugs in init logic
 
 	struct work_struct	nec_work;	/* Worker for NEC quirk */
@@ -607,15 +608,12 @@ static inline u32 hc32_to_cpup (const st
 /* HCCA frame number is 16 bits, but is accessed as 32 bits since not all
  * hardware handles 16 bit reads.  That creates a different confusion on
  * some big-endian SOC implementations.  Same thing happens with PSW access.
- *
- * FIXME: Deal with that as a runtime quirk when STB03xxx is ported over
- * to arch/powerpc
  */
 
-#ifdef CONFIG_STB03xxx
-#define OHCI_BE_FRAME_NO_SHIFT	16
+#ifdef CONFIG_PPC_MPC52xx
+#define big_endian_frame_no_quirk(ohci)	(ohci->flags & OHCI_QUIRK_FRAME_NO)
 #else
-#define OHCI_BE_FRAME_NO_SHIFT	0
+#define big_endian_frame_no_quirk(ohci)	0
 #endif
 
 static inline u16 ohci_frame_no(const struct ohci_hcd *ohci)
@@ -623,7 +621,8 @@ static inline u16 ohci_frame_no(const st
 	u32 tmp;
 	if (big_endian_desc(ohci)) {
 		tmp = be32_to_cpup((__force __be32 *)&ohci->hcca->frame_no);
-		tmp >>= OHCI_BE_FRAME_NO_SHIFT;
+		if (!big_endian_frame_no_quirk(ohci))
+			tmp >>= 16;
 	} else
 		tmp = le32_to_cpup((__force __le32 *)&ohci->hcca->frame_no);
 
diff -pruN linux-2.6.orig/drivers/usb/host/ohci-ppc-of.c linux-2.6/drivers/usb/host/ohci-ppc-of.c
--- linux-2.6.orig/drivers/usb/host/ohci-ppc-of.c	2007-10-08 16:30:28.000000000 +0400
+++ linux-2.6/drivers/usb/host/ohci-ppc-of.c	2007-10-08 20:42:53.000000000 +0400
@@ -134,8 +134,11 @@ ohci_hcd_ppc_of_probe(struct of_device *
 	}
 
 	ohci = hcd_to_ohci(hcd);
-	if (is_bigendian)
+	if (is_bigendian) {
 		ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
+		if (of_device_is_compatible(dn, "mpc5200-ohci"))
+			ohci->flags |= OHCI_QUIRK_FRAME_NO;
+	}
 
 	ohci_hcd_init(ohci);
 
diff -pruN linux-2.6.orig/drivers/usb/host/ohci-ppc-soc.c linux-2.6/drivers/usb/host/ohci-ppc-soc.c
--- linux-2.6.orig/drivers/usb/host/ohci-ppc-soc.c	2007-10-08 16:30:28.000000000 +0400
+++ linux-2.6/drivers/usb/host/ohci-ppc-soc.c	2007-10-08 22:31:44.000000000 +0400
@@ -73,6 +73,11 @@ static int usb_hcd_ppc_soc_probe(const s
 
 	ohci = hcd_to_ohci(hcd);
 	ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
+
+#ifdef CONFIG_PPC_MPC52xx
+	/* MPC52xx doesn't need frame_no shift */
+	ohci->flags |= OHCI_QUIRK_FRAME_NO;
+#endif
 	ohci_hcd_init(ohci);
 
 	retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);

^ permalink raw reply

* Please pull from 'for-2.6.24'
From: Kumar Gala @ 2007-10-08 18:32 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Please pull from 'for-2.6.24' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24

to receive the following updates:

 Documentation/powerpc/booting-without-of.txt      |  243 +++++
 arch/powerpc/Kconfig                              |   14
 arch/powerpc/Kconfig.debug                        |   21
 arch/powerpc/boot/Makefile                        |    8
 arch/powerpc/boot/cpm-serial.c                    |   44
 arch/powerpc/boot/cuboot-8xx.c                    |    8
 arch/powerpc/boot/cuboot-hpc2.c                   |   48 +
 arch/powerpc/boot/cuboot-pq2.c                    |   70 -
 arch/powerpc/boot/dts/ep88xc.dts                  |  214 ++++
 arch/powerpc/boot/dts/lite5200.dts                |   10
 arch/powerpc/boot/dts/lite5200b.dts               |   62 -
 arch/powerpc/boot/dts/mpc7448hpc2.dts             |    5
 arch/powerpc/boot/dts/mpc8272ads.dts              |  318 +++---
 arch/powerpc/boot/dts/mpc8313erdb.dts             |    4
 arch/powerpc/boot/dts/mpc8349emitx.dts            |    4
 arch/powerpc/boot/dts/mpc8349emitxgp.dts          |    4
 arch/powerpc/boot/dts/mpc834x_mds.dts             |    4
 arch/powerpc/boot/dts/mpc8568mds.dts              |  156 +--
 arch/powerpc/boot/dts/mpc8610_hpcd.dts            |  191 ++++
 arch/powerpc/boot/dts/mpc8641_hpcn.dts            |    6
 arch/powerpc/boot/dts/mpc885ads.dts               |  206 ++--
 arch/powerpc/boot/dts/pq2fads.dts                 |  240 +++++
 arch/powerpc/boot/ep88xc.c                        |   54 +
 arch/powerpc/boot/fixed-head.S                    |    4
 arch/powerpc/boot/fsl-soc.c                       |   57 +
 arch/powerpc/boot/fsl-soc.h                       |    8
 arch/powerpc/boot/mpc8xx.c                        |   82 +
 arch/powerpc/boot/mpc8xx.h                        |   11
 arch/powerpc/boot/pq2.c                           |  102 ++
 arch/powerpc/boot/pq2.h                           |   11
 arch/powerpc/boot/wrapper                         |   20
 arch/powerpc/configs/ep88xc_defconfig             |  751 ++++++++++++++++
 arch/powerpc/configs/mpc8272_ads_defconfig        |  248 +++--
 arch/powerpc/configs/mpc8610_hpcd_defconfig       | 1023 ++++++++++++++++++++++
 arch/powerpc/configs/mpc885_ads_defconfig         |  297 +++---
 arch/powerpc/configs/pq2fads_defconfig            | 1003 +++++++++++++++++++++
 arch/powerpc/kernel/Makefile                      |    2
 arch/powerpc/kernel/head_32.S                     |   16
 arch/powerpc/kernel/head_8xx.S                    |   10
 arch/powerpc/kernel/head_fsl_booke.S              |   76 -
 arch/powerpc/kernel/softemu8xx.c                  |  202 ++++
 arch/powerpc/kernel/traps.c                       |    6
 arch/powerpc/kernel/udbg.c                        |    2
 arch/powerpc/kernel/vdso32/.gitignore             |    1
 arch/powerpc/kernel/vdso64/.gitignore             |    1
 arch/powerpc/mm/fsl_booke_mmu.c                   |    2
 arch/powerpc/mm/init_32.c                         |    3
 arch/powerpc/platforms/82xx/Kconfig               |   24
 arch/powerpc/platforms/82xx/Makefile              |    6
 arch/powerpc/platforms/82xx/mpc8272_ads.c         |  196 ++++
 arch/powerpc/platforms/82xx/mpc82xx.c             |  109 --
 arch/powerpc/platforms/82xx/mpc82xx_ads.c         |  631 -------------
 arch/powerpc/platforms/82xx/pq2.c                 |   82 +
 arch/powerpc/platforms/82xx/pq2.h                 |   20
 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c      |  195 ++++
 arch/powerpc/platforms/82xx/pq2ads.h              |    8
 arch/powerpc/platforms/82xx/pq2fads.c             |  198 ++++
 arch/powerpc/platforms/83xx/mpc8313_rdb.c         |    2
 arch/powerpc/platforms/83xx/mpc832x_mds.c         |    4
 arch/powerpc/platforms/83xx/mpc832x_rdb.c         |    4
 arch/powerpc/platforms/83xx/mpc834x_itx.c         |    2
 arch/powerpc/platforms/83xx/mpc834x_mds.c         |    2
 arch/powerpc/platforms/83xx/mpc836x_mds.c         |    4
 arch/powerpc/platforms/85xx/Kconfig               |    2
 arch/powerpc/platforms/85xx/Makefile              |    1
 arch/powerpc/platforms/85xx/misc.c                |   55 -
 arch/powerpc/platforms/85xx/mpc85xx.h             |   17
 arch/powerpc/platforms/85xx/mpc85xx_ads.c         |    6
 arch/powerpc/platforms/85xx/mpc85xx_cds.c         |   23
 arch/powerpc/platforms/85xx/mpc85xx_ds.c          |   23
 arch/powerpc/platforms/85xx/mpc85xx_mds.c         |   42
 arch/powerpc/platforms/86xx/Kconfig               |   13
 arch/powerpc/platforms/86xx/Makefile              |    1
 arch/powerpc/platforms/86xx/mpc8610_hpcd.c        |  216 ++++
 arch/powerpc/platforms/86xx/mpc8641_hpcn.h        |   21
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c        |   23
 arch/powerpc/platforms/8xx/Kconfig                |   28
 arch/powerpc/platforms/8xx/Makefile               |    1
 arch/powerpc/platforms/8xx/ep88xc.c               |  176 +++
 arch/powerpc/platforms/8xx/m8xx_setup.c           |   90 -
 arch/powerpc/platforms/8xx/mpc86xads.h            |    3
 arch/powerpc/platforms/8xx/mpc86xads_setup.c      |   10
 arch/powerpc/platforms/8xx/mpc885ads.h            |   41
 arch/powerpc/platforms/8xx/mpc885ads_setup.c      |  460 +++------
 arch/powerpc/platforms/Kconfig                    |   15
 arch/powerpc/platforms/embedded6xx/Kconfig        |    1
 arch/powerpc/platforms/embedded6xx/linkstation.c  |    2
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |    2
 arch/powerpc/sysdev/Makefile                      |    1
 arch/powerpc/sysdev/commproc.c                    |  279 +++++-
 arch/powerpc/sysdev/commproc.h                    |   12
 arch/powerpc/sysdev/cpm2_common.c                 |  176 +++
 arch/powerpc/sysdev/cpm2_pic.c                    |    2
 arch/powerpc/sysdev/cpm_common.c                  |  205 ++++
 arch/powerpc/sysdev/fsl_pci.c                     |    5
 arch/powerpc/sysdev/fsl_soc.c                     |   80 +
 arch/powerpc/sysdev/fsl_soc.h                     |    1
 arch/powerpc/sysdev/mpc8xx_pic.c                  |   19
 arch/powerpc/sysdev/qe_lib/qe.c                   |   36
 arch/powerpc/sysdev/qe_lib/qe_ic.c                |   31
 arch/powerpc/sysdev/qe_lib/qe_io.c                |   38
 arch/powerpc/sysdev/qe_lib/ucc.c                  |  270 ++---
 arch/powerpc/sysdev/qe_lib/ucc_fast.c             |  127 +-
 arch/powerpc/sysdev/qe_lib/ucc_slow.c             |   48 -
 drivers/net/ucc_geth.c                            |    2
 drivers/net/ucc_geth.h                            |    1
 drivers/serial/cpm_uart/cpm_uart.h                |   48 -
 drivers/serial/cpm_uart/cpm_uart_core.c           |  539 ++++++++---
 drivers/serial/cpm_uart/cpm_uart_cpm1.c           |   18
 drivers/serial/cpm_uart/cpm_uart_cpm1.h           |   16
 drivers/serial/cpm_uart/cpm_uart_cpm2.c           |   24
 drivers/serial/cpm_uart/cpm_uart_cpm2.h           |   16
 include/asm-powerpc/commproc.h                    |   65 +
 include/asm-powerpc/cpm.h                         |   14
 include/asm-powerpc/cpm2.h                        |   26
 include/asm-powerpc/cputable.h                    |   10
 include/asm-powerpc/fs_pd.h                       |   38
 include/asm-powerpc/immap_86xx.h                  |   86 +
 include/asm-powerpc/immap_cpm2.h                  |    4
 include/asm-powerpc/immap_qe.h                    |   35
 include/asm-powerpc/qe.h                          |  243 +++--
 include/asm-powerpc/qe_ic.h                       |   68 +
 include/asm-powerpc/ucc.h                         |   40
 include/asm-powerpc/ucc_slow.h                    |    9
 include/asm-powerpc/udbg.h                        |    1
 include/linux/pci_ids.h                           |    1
 126 files changed, 8477 insertions(+), 2788 deletions(-)

Anton Vorontsov (8):
      [POWERPC] fsl_soc: fix uninitialized i2c_board_info structure
      [POWERPC] MPC8568E-MDS: add support for ds1374 rtc
      [POWERPC] mpc8568mds.dts: fix PCIe I/O address space location and size
      [POWERPC] mpc85xx_mds: select QUICC_ENGINE
      [POWERPC] QEIC: Implement pluggable handlers, fix MPIC cascading
      [POWERPC] QE: pario - support for MPC85xx layout
      [POWERPC] 85xx: mpc8568mds - update dts to be able to use UCCs
      [POWERPC] 85xx: mpc85xx_mds - reset UCC ethernet properly

Dale Farnsworth (1):
      [POWERPC] 85xx: Failure with odd memory sizes and CONFIG_HIGHMEM

Emil Medve (1):
      [POWERPC] QE: Added missing CEURNR register

Grant Likely (1):
      [POWERPC] Lite5200: Use comma delimiter format for lists in device tree

Jason Jin (1):
      [POWERPC] Treat 8610 PCIe host bridge as transparent

John Traill (1):
      [POWERPC] 8xx: Set initial memory limit.

Kumar Gala (6):
      [POWERPC] Cleaned up whitespace in head_fsl_booke.S
      [POWERPC] Fixup MPC8568 dts
      [POWERPC] Update .gitignore for new vdso generated files
      [POWERPC] FSL: Access PCIe LTSSM register with correct size
      [POWERPC] Use for_each_ matching routinues for pci PHBs
      [POWERPC] 85xx/86xx: refactor RSTCR reset code

Peter Korsgaard (5):
      [POWERPC] fsl_soc: Fix trivial printk typo.
      [POWERPC] fsl_soc: rtc-ds1307 support
      [POWERPC] spi: Use fsl_spi instead of mpc83xx_spi
      [POWERPC] spi: mode should be "cpu-qe" instead of "qe"
      [POWERPC] spi: Support non-QE processors

Roy Zang (1):
      [POWERPC] bootwrapper: adds cuboot for MPC7448HPC2 platform

Scott Wood (27):
      [POWERPC] CPM: Change from fsl,brg-frequency to brg/clock-frequency
      [POWERPC] Introduce new CPM device bindings.
      [POWERPC] Add early debug console for CPM serial ports.
      [POWERPC] bootwrapper: Support all-in-one PCI nodes in cuboot-pq2.
      [POWERPC] bootwrapper: Add fsl_get_immr() and 8xx/pq2 clock functions.
      [POWERPC] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.
      [POWERPC] cpm_uart: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.
      [POWERPC] cpm_uart: sparse fixes
      [POWERPC] cpm_uart: Issue STOP_TX command before initializing console.
      [POWERPC] 8xx: Fix CONFIG_PIN_TLB.
      [POWERPC] 8xx: Infrastructure code cleanup.
      [POWERPC] 8xx: Add pin and clock setting functions.
      [POWERPC] 8xx: Work around CPU15 erratum.
      [POWERPC] cpm2: Infrastructure code cleanup.
      [POWERPC] cpm2: Add SCCs to cpm2_clk_setup(), and cpm2_smc_clk_setup().
      [POWERPC] cpm2: Add cpm2_set_pin().
      [POWERPC] mpc82xx: Define CPU_FTR_NEED_COHERENT
      [POWERPC] mpc82xx: Remove a bunch of cruft that duplicates generic functionality.
      [POWERPC] mpc82xx: Rename mpc82xx_ads to mpc8272_ads.
      [POWERPC] mpc8272ads: Change references from 82xx_ADS to 8272_ADS.
      [POWERPC] Document local bus nodes in the device tree, and update cuboot-pq2.
      [POWERPC] 8xx: mpc885ads cleanup
      [POWERPC] 8xx/wrapper: Embedded Planet EP88xC support
      [POWERPC] mpc82xx: Update mpc8272ads, and factor out PCI and reset.
      [POWERPC] mpc82xx: Add pq2fads board support.
      [POWERPC] 8xx: Move softemu8xx.c from arch/ppc
      [POWERPC] cpm: Describe multi-user ram in its own device node.

Timur Tabi (2):
      [POWERPC] qe: miscellaneous code improvements and fixes to the QE library
      [POWERPC] 86xx: update immap_86xx.h for the 8610

Xianghua Xiao (2):
      [POWERPC] Add initial MPC8610 HPCD Device Tree Source file.
      [POWERPC] Add initial MPC8610 HPCD Platform files.

^ permalink raw reply

* Re: [PATCH 0/3] usb: ehci ppc device-tree-aware driver
From: Valentine Barshak @ 2007-10-08 18:22 UTC (permalink / raw)
  To: jyoung5; +Cc: linuxppc-dev, linux-usb-devel, Hollis Blanchard
In-Reply-To: <470A746E.4050804@ru.mvista.com>

Valentine Barshak wrote:
> Jerone Young wrote:
>> So the issue here with the Sequoia board is that if you load a kernel or
>> initrd from usb stick while under u-boot environment, when Linux boots
>> it will see the network adapter & even set an ip for it. But no matter
>> what it is unable to access any outside ip.
>>
>> The way we recreated this scenario was:
>>
>> - Have a USB stick with
>>     - partition 1 is fat partition with our kernel & initrd
>>     - partition 2 is ext3 with our root filesystem
>>
>> 1) Boot Sequoia board with USB stick plugged in. Go to u-boot prompt.
>> 2) start usb using "usb start"
>> 3) Load kernel off usb stick using "fatload" command in uboot
>>    * Optionally load initrd off of usb stick
>>    * Example:
>>       fatload usb 0:1 4000000 cuImage.sequoia
>>     
>> 4) stop usb using "usb stop"
>> 5) Then boot kernel using bootm
>>
>> Now from this point linux loads and will mount the filesystem on the usb
>> stick.  But if you want to use networking in anyway you have a problem.
>> You can start the telnet daemon and access from the board using
>> 127.0.0.1 address (loopback). Trying to access the telnet from an
>> outside ip is unsuccessful.
>>
>> Also, if you have it setup so that the root filesystem is on a nfs root,
>> the kernel is never able to get to the nfs root. Basically something is
>> really borked.
>>
>> I'm a little late getting back to this email :-0
>>
>> On Sat, 2007-09-22 at 23:00 +0000, Hollis Blanchard wrote:
>>> On Mon, 17 Sep 2007 16:50:39 +0400, Valentine Barshak wrote:
>>>
>>>> Some PowerPC systems have a built-in EHCI controller.
>>>> This is a device tree aware version of the EHCI controller driver.
>>>> Currently it's been tested on the PowerPC 440EPx Sequoia board.
>>>> Other platforms can be added later.
>>>> The code is based on the ehci-ppc-soc driver by Stefan Roese <sr@denx.de>.
>>> We're having a strange issue on our Sequoia where the network stops
>>> functioning when USB is active. Jerone can supply more detail...
>>>
>>> Have you seen anything like that?
>>>
> Please try this patch:
> http://ozlabs.org/pipermail/linuxppc-dev/2007-October/043435.html
> Thanks,
> Valentine.

Also please, don't forget to uncomment this line:
#	select IBM_NEW_EMAC_RGMII
It's commented out in the original patch since new EMAC support hasn't 
been merged yet.
Thanks,
Valentine.

>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH 0/3] usb: ehci ppc device-tree-aware driver
From: Valentine Barshak @ 2007-10-08 18:18 UTC (permalink / raw)
  To: jyoung5; +Cc: linuxppc-dev, linux-usb-devel, Hollis Blanchard
In-Reply-To: <1191867353.5618.17.camel@laptop>

Jerone Young wrote:
> So the issue here with the Sequoia board is that if you load a kernel or
> initrd from usb stick while under u-boot environment, when Linux boots
> it will see the network adapter & even set an ip for it. But no matter
> what it is unable to access any outside ip.
> 
> The way we recreated this scenario was:
> 
> - Have a USB stick with
>     - partition 1 is fat partition with our kernel & initrd
>     - partition 2 is ext3 with our root filesystem
> 
> 1) Boot Sequoia board with USB stick plugged in. Go to u-boot prompt.
> 2) start usb using "usb start"
> 3) Load kernel off usb stick using "fatload" command in uboot
>    * Optionally load initrd off of usb stick
>    * Example:
>       fatload usb 0:1 4000000 cuImage.sequoia
>     
> 4) stop usb using "usb stop"
> 5) Then boot kernel using bootm
> 
> Now from this point linux loads and will mount the filesystem on the usb
> stick.  But if you want to use networking in anyway you have a problem.
> You can start the telnet daemon and access from the board using
> 127.0.0.1 address (loopback). Trying to access the telnet from an
> outside ip is unsuccessful.
> 
> Also, if you have it setup so that the root filesystem is on a nfs root,
> the kernel is never able to get to the nfs root. Basically something is
> really borked.
> 
> I'm a little late getting back to this email :-0
> 
> On Sat, 2007-09-22 at 23:00 +0000, Hollis Blanchard wrote:
>> On Mon, 17 Sep 2007 16:50:39 +0400, Valentine Barshak wrote:
>>
>>> Some PowerPC systems have a built-in EHCI controller.
>>> This is a device tree aware version of the EHCI controller driver.
>>> Currently it's been tested on the PowerPC 440EPx Sequoia board.
>>> Other platforms can be added later.
>>> The code is based on the ehci-ppc-soc driver by Stefan Roese <sr@denx.de>.
>> We're having a strange issue on our Sequoia where the network stops
>> functioning when USB is active. Jerone can supply more detail...
>>
>> Have you seen anything like that?
>>
> 
Please try this patch:
http://ozlabs.org/pipermail/linuxppc-dev/2007-October/043435.html
Thanks,
Valentine.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH 6/7] [POWERPC] mpc8568mds.dts: fix PCI/PCIe nodes
From: Kumar Gala @ 2007-10-08 18:18 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <8B3EB438-F672-4E13-A29A-3F21D0048CF0@kernel.crashing.org>

>>
>> Which patch? Valentine's or mine under the subject? Don't know
>> about the
>> former, but mine patch is pretty obvious: your commit
>> 5bece127f0666996ca90772229e00332a34e516c moved PCI nodes out of soc
>> node,
>> but you forgot to change regs = <>, thus instead of e000a000/ 
>> e0008000,
>> kernel used a000/8000 for accessing PCI ccsr registers.
>
> Yeah, I see that bug now.  It looks like I wasn't getting my new .dts
> on the board.  Will fixup that issue in my patch.

Ok, I've tested my updated tree and it works for PCIe with the fix to  
the .dts

- k

^ permalink raw reply

* Re: [PATCH 0/3] usb: ehci ppc device-tree-aware driver
From: Jerone Young @ 2007-10-08 18:15 UTC (permalink / raw)
  To: Hollis Blanchard; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <fd46qj$s6r$1@sea.gmane.org>

So the issue here with the Sequoia board is that if you load a kernel or
initrd from usb stick while under u-boot environment, when Linux boots
it will see the network adapter & even set an ip for it. But no matter
what it is unable to access any outside ip.

The way we recreated this scenario was:

- Have a USB stick with
    - partition 1 is fat partition with our kernel & initrd
    - partition 2 is ext3 with our root filesystem

1) Boot Sequoia board with USB stick plugged in. Go to u-boot prompt.
2) start usb using "usb start"
3) Load kernel off usb stick using "fatload" command in uboot
   * Optionally load initrd off of usb stick
   * Example:
      fatload usb 0:1 4000000 cuImage.sequoia
    
4) stop usb using "usb stop"
5) Then boot kernel using bootm

Now from this point linux loads and will mount the filesystem on the usb
stick.  But if you want to use networking in anyway you have a problem.
You can start the telnet daemon and access from the board using
127.0.0.1 address (loopback). Trying to access the telnet from an
outside ip is unsuccessful.

Also, if you have it setup so that the root filesystem is on a nfs root,
the kernel is never able to get to the nfs root. Basically something is
really borked.

I'm a little late getting back to this email :-0

On Sat, 2007-09-22 at 23:00 +0000, Hollis Blanchard wrote:
> On Mon, 17 Sep 2007 16:50:39 +0400, Valentine Barshak wrote:
> 
> > Some PowerPC systems have a built-in EHCI controller.
> > This is a device tree aware version of the EHCI controller driver.
> > Currently it's been tested on the PowerPC 440EPx Sequoia board.
> > Other platforms can be added later.
> > The code is based on the ehci-ppc-soc driver by Stefan Roese <sr@denx.de>.
> 
> We're having a strange issue on our Sequoia where the network stops
> functioning when USB is active. Jerone can supply more detail...
> 
> Have you seen anything like that?
> 

^ permalink raw reply

* Re: [patch 6/6] PS3: Add os-area database routines
From: Geoff Levand @ 2007-10-08 17:52 UTC (permalink / raw)
  To: Ranulf Doswell; +Cc: linuxppc-dev
In-Reply-To: <18a15270710080648x3b5f1135meea3d7b048a1a543@mail.gmail.com>

Ranulf Doswell wrote:
> On 06/10/2007, *geoffrey.levand@am.sony.com
> <mailto:geoffrey.levand@am.sony.com>* <geoffrey.levand@am.sony.com
> <mailto:geoffrey.levand@am.sony.com>> wrote:
> 
>> enum os_area_db_owner {
> 
>> 	OS_AREA_DB_OWNER_ANY = -1,
>> 	OS_AREA_DB_OWNER_NONE = 0,
>>	OS_AREA_DB_OWNER_PROTOTYPE = 1,
>>	OS_AREA_DB_OWNER_LINUX = 2,
> 
>>	OS_AREA_DB_OWNER_PETITBOOT = 3,
>>	OS_AREA_DB_OWNER_MAX = 32,
>>};
>>
>>enum os_area_db_key {
>>	OS_AREA_DB_KEY_ANY = -1,
>>	OS_AREA_DB_KEY_NONE = 0,
>>	OS_AREA_DB_KEY_RTC_DIFF = 1,
> 
>>	OS_AREA_DB_KEY_VIDEO_MODE = 2,
>>	OS_AREA_DB_KEY_MAX = 8,
>>};
> 
> How do we go about claiming one of these OS_AREA_DB_OWNER_ keys? I'd
> very much like to use this functionality in my python-ps3 games library.


It sounds like you should be storing your info in the file system like
all other applications do.

^ permalink raw reply

* Re: [patch 2/6] PS3: Remove unused os-area params
From: Geoff Levand @ 2007-10-08 17:53 UTC (permalink / raw)
  To: Ranulf Doswell; +Cc: linuxppc-dev
In-Reply-To: <18a15270710080700m514b49f6p7dc9cf6c8f80d6a6@mail.gmail.com>

Ranulf Doswell wrote:
> On 06/10/2007, *geoffrey.levand@am.sony.com
> <mailto:geoffrey.levand@am.sony.com>* <geoffrey.levand@am.sony.com
> <mailto:geoffrey.levand@am.sony.com>> wrote:
> 
>> struct saved_params {
>>-	/* param 0 */
>> 	s64 rtc_diff;
>> 	unsigned int av_multi_out;
>>-	unsigned int ctrl_button;
>>-	/* param 1 */
>>-	u8 static_ip_addr[4];
>>-	u8 network_mask[4];
> 
>>-	u8 default_gateway[4];
>>-	/* param 2 */
>>-	u8 dns_primary[4];
>>-	u8 dns_secondary[4];
>> } static saved_params;
> 
> As these values are correctly populated by the hypervisor from the
> preferences on the standard PS3 OS, it is incredibly useful to have this
> information available.


No, it is not used, and I never used it.


> Whilst none of the current 'popular' distributions use these fields, I
> am currently in the process of making a bootable CD image that does use
> them in order to initialise the network. Not having this information
> available means that the only sensible option is to use DHCP, which may
> well not be available in every case.
> 
> Please can we have these fields back? They don't actually take up all
> that much room, yet they are incredibly useful.


As a general rule we don't put unused code into the kernel, and I have no
plan to provide the support you mention.  Please submit a patch to the ML
with your feature for review.

-Geoff

^ permalink raw reply

* [RFC][PATCH] Move TASK_SIZE to 0xc0000000 for ppc32
From: Kumar Gala @ 2007-10-08 17:48 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras, Pantelis Antoniou

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 :).

Also, note that change in head_32.S for 603.  I made the test match with
what we don on 4xx/fsl-booke.  (Haven't tested this on a system yet).

I'll probably break this up into two patches if we all like this any
possible issues in the future are decoupled.

- k

---

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3180457..70e1f89 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -599,7 +599,8 @@ config TASK_SIZE_BOOL

 config TASK_SIZE
 	hex "Size of user task space" if TASK_SIZE_BOOL
-	default "0x80000000"
+	default "0x80000000" if PPC_PREP
+	default "0xc0000000"

 config CONSISTENT_START_BOOL
 	bool "Set custom consistent memory pool address"
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index d83f04e..a5b13ae 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -469,12 +469,12 @@ InstructionTLBMiss:
 	mfctr	r0
 	/* Get PTE (linux-style) and check access */
 	mfspr	r3,SPRN_IMISS
-	lis	r1,KERNELBASE@h		/* check if kernel address */
-	cmplw	0,r3,r1
+	lis	r1,PAGE_OFFSET@h		/* check if kernel address */
+	cmplw	0,r1,r3
 	mfspr	r2,SPRN_SPRG3
 	li	r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
 	lwz	r2,PGDIR(r2)
-	blt+	112f
+	bge-	112f
 	mfspr	r2,SPRN_SRR1		/* and MSR_PR bit from SRR1 */
 	rlwimi	r1,r2,32-12,29,29	/* shift MSR_PR to _PAGE_USER posn */
 	lis	r2,swapper_pg_dir@ha	/* if kernel address, use */
@@ -543,12 +543,12 @@ DataLoadTLBMiss:
 	mfctr	r0
 	/* Get PTE (linux-style) and check access */
 	mfspr	r3,SPRN_DMISS
-	lis	r1,KERNELBASE@h		/* check if kernel address */
-	cmplw	0,r3,r1
+	lis	r1,PAGE_OFFSET@h		/* check if kernel address */
+	cmplw	0,r1,r3
 	mfspr	r2,SPRN_SPRG3
 	li	r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
 	lwz	r2,PGDIR(r2)
-	blt+	112f
+	bge-	112f
 	mfspr	r2,SPRN_SRR1		/* and MSR_PR bit from SRR1 */
 	rlwimi	r1,r2,32-12,29,29	/* shift MSR_PR to _PAGE_USER posn */
 	lis	r2,swapper_pg_dir@ha	/* if kernel address, use */
@@ -615,12 +615,12 @@ DataStoreTLBMiss:
 	mfctr	r0
 	/* Get PTE (linux-style) and check access */
 	mfspr	r3,SPRN_DMISS
-	lis	r1,KERNELBASE@h		/* check if kernel address */
-	cmplw	0,r3,r1
+	lis	r1,PAGE_OFFSET@h		/* check if kernel address */
+	cmplw	0,r1,r3
 	mfspr	r2,SPRN_SPRG3
 	li	r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */
 	lwz	r2,PGDIR(r2)
-	blt+	112f
+	bge-	112f
 	mfspr	r2,SPRN_SRR1		/* and MSR_PR bit from SRR1 */
 	rlwimi	r1,r2,32-12,29,29	/* shift MSR_PR to _PAGE_USER posn */
 	lis	r2,swapper_pg_dir@ha	/* if kernel address, use */
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index e312824..cfefc2d 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -289,7 +289,7 @@ label:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
@@ -481,7 +481,7 @@ label:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
@@ -581,7 +581,7 @@ label:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 864d63f..409db61 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -319,7 +319,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
@@ -458,7 +458,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
@@ -528,7 +528,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
+	lis	r11, PAGE_OFFSET@h
 	cmplw	r10, r11
 	blt+	3f
 	lis	r11, swapper_pg_dir@h
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index ee33ddd..4b98227 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -461,8 +461,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
-	ori	r11, r11, TASK_SIZE@l
+	lis	r11, PAGE_OFFSET@h
 	cmplw	0, r10, r11
 	bge	2f

@@ -584,8 +583,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
-	ori	r11, r11, TASK_SIZE@l
+	lis	r11, PAGE_OFFSET@h
 	cmplw	5, r10, r11
 	blt	5, 3f
 	lis	r11, swapper_pg_dir@h
@@ -645,8 +643,7 @@ interrupt_base:
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	lis	r11, TASK_SIZE@h
-	ori	r11, r11, TASK_SIZE@l
+	lis	r11, PAGE_OFFSET@h
 	cmplw	5, r10, r11
 	blt	5, 3f
 	lis	r11, swapper_pg_dir@h
@@ -744,7 +741,7 @@ data_access:
  *	r10 - EA of fault
  *	r11 - TLB (info from Linux PTE)
  *	r12, r13 - available to use
- *	CR5 - results of addr < TASK_SIZE
+ *	CR5 - results of addr >= PAGE_OFFSET
  *	MAS0, MAS1 - loaded with proper value when we get here
  *	MAS2, MAS3 - will need additional info from Linux PTE
  *	Upon exit, we reload everything and RFI.

^ permalink raw reply related

* Re: [linux-usb-devel] [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: Valentine Barshak @ 2007-10-08 17:42 UTC (permalink / raw)
  To: Kumar Gala; +Cc: David Brownell, linuxppc-dev, linux-usb-devel
In-Reply-To: <7363E251-62FF-4574-9FF7-8E5719012BAD@kernel.crashing.org>

Kumar Gala wrote:
> 
> On Oct 8, 2007, at 11:19 AM, David Brownell wrote:
> 
>>>> Near as I can tell, the original code is wrong ... the hcca->frame_no
>>>> byte offset is fully specified, so that shift should always be 16.
>>>
>>> Are you saying that it should always be #define OHCI_BE_FRAME_NO_SHIFT
>>> 16 for big endian platforms?
>>
>> More than that, I'm saying that shouldn't even be a #define!  The
>> default should be that drivers expect chips to follow the interface
>> specs.  Any value other than 16 violates the OHCI spec.
>>
>> 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?
> 
> - k

I've looked at drivers/usb/host/Kconfig
It seems to be MPC52xx.
David, is that the one you mentioned?
Thanks,
Valentine.

^ permalink raw reply

* Re: [linux-usb-devel] [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: Kumar Gala @ 2007-10-08 17:39 UTC (permalink / raw)
  To: David Brownell; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <20071008161927.84C601915AE@adsl-69-226-248-13.dsl.pltn13.pacbell.net>


On Oct 8, 2007, at 11:19 AM, David Brownell wrote:

>>> Near as I can tell, the original code is wrong ... the hcca- 
>>> >frame_no
>>> byte offset is fully specified, so that shift should always be 16.
>>
>> Are you saying that it should always be #define  
>> OHCI_BE_FRAME_NO_SHIFT
>> 16 for big endian platforms?
>
> More than that, I'm saying that shouldn't even be a #define!  The
> default should be that drivers expect chips to follow the interface
> specs.  Any value other than 16 violates the OHCI spec.
>
> 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?

- k

^ permalink raw reply


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