[PATCH] ppc32: add Freescale MPC885ADS board support

STALE7716d

10 messages, 4 authors, 2005-06-29 · open the first message on its own page

[PATCH] ppc32: add Freescale MPC885ADS board support

From: Andrei Konovalov <hidden>
Date: 2005-06-23 15:32:00

Andrew,

This the second version of the patch
(the first post is
  http://lkml.org/lkml/2005/6/10/119).
The new version is based on current linux-2.6.git, and
assumes the "add Freescale MPC86xADS boards support" patch
I've sent few minutes ago is applied first.
Otherwise the patch is the same as the first version.

Please, consider applying.

Thanks,
Andrei

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Marcelo Tosatti <hidden>
Date: 2005-06-23 19:45:02

Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted hunk
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
 #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
 	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
 #endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
 	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
 #endif
 #ifdef CONFIG_PCI
I suppose you also want to include CONFIG_MPC885ADS in the io_block_mapping(IO_BASE) 
here?

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Eugene Surovegin <hidden>
Date: 2005-06-23 20:01:11

On Thu, Jun 23, 2005 at 11:05:22AM -0300, Marcelo Tosatti wrote:
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
 #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
 	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
 #endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
 	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
 #endif
 #ifdef CONFIG_PCI
I suppose you also want to include CONFIG_MPC885ADS in the io_block_mapping(IO_BASE) 
here?
I think it'd be great if we _stop_ adding new io_block_mapping users, 
there is ioremap() for stuff like this, let's use it instead.

-- 
Eugene

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Marcelo Tosatti <hidden>
Date: 2005-06-24 01:32:02

On Thu, Jun 23, 2005 at 12:48:56PM -0700, Eugene Surovegin wrote:
On Thu, Jun 23, 2005 at 11:05:22AM -0300, Marcelo Tosatti wrote:
quoted
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
 #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
 	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
 #endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
 	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
 #endif
 #ifdef CONFIG_PCI
I suppose you also want to include CONFIG_MPC885ADS in the io_block_mapping(IO_BASE) 
here?
I think it'd be great if we _stop_ adding new io_block_mapping users, 
there is ioremap() for stuff like this, let's use it instead.
(go back after reading previous discussion)

For that you need ioremap() to handle BATs and CAMs right?
What would be the difficulties with doing that?

For 8xx (which lacks BAT's and CAM's) we could try immediately I suppose.

Seems to be BenH's plan, along with making the virtual addresses
dynamic and not static. 

While at it, what are the possibilities of making BAT's and/or CAM's
available to userspace through hugetlbfs or some other mechanism?

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Eugene Surovegin <hidden>
Date: 2005-06-24 02:11:45

On Thu, Jun 23, 2005 at 05:03:01PM -0300, Marcelo Tosatti wrote:
On Thu, Jun 23, 2005 at 12:48:56PM -0700, Eugene Surovegin wrote:
quoted
On Thu, Jun 23, 2005 at 11:05:22AM -0300, Marcelo Tosatti wrote:
quoted
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
 #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
 	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
 #endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
 	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
 #endif
 #ifdef CONFIG_PCI
I suppose you also want to include CONFIG_MPC885ADS in the io_block_mapping(IO_BASE) 
here?
I think it'd be great if we _stop_ adding new io_block_mapping users, 
there is ioremap() for stuff like this, let's use it instead.
(go back after reading previous discussion)

For that you need ioremap() to handle BATs and CAMs right?
Why? BATs or CAMs are just an optimization. You can use ordinary 4K 
ptes.

We don't have BATs on 44x and don't use io_block_mapping also. It's 
not that difficult - just start using ioremap() instead of 
io_block_mapping() and fix code which assumes phys_addr == virt_addr.

-- 
Eugene

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Andrei Konovalov <hidden>
Date: 2005-06-24 15:12:46

Hi Marcelo,

Marcelo Tosatti wrote:
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
#if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
#endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
#endif
#ifdef CONFIG_PCI

I suppose you also want to include CONFIG_MPC885ADS in the io_block_mapping(IO_BASE) 
here?
No, not at the moment at least.
Actually, the patch doesn't even #define IO_BASE.
In 2.4 that io_block_mapping(IO_BASE) was needed for PCMCIA / CF cards to work.
We haven't got to PCMCIA support in 2.6 yet, and PCMCIA is unlikely to work
as is in case of MPC885ADS, as drivers/pcmcia/m8xx_pcmcia.c is just missing.
We plan to address PCMCIA later.


Thanks,
Andrei

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Tom Rini <hidden>
Date: 2005-06-24 15:47:02

On Fri, Jun 24, 2005 at 07:21:37PM +0400, Andrei Konovalov wrote:
Hi Marcelo,

Marcelo Tosatti wrote:
quoted
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
#if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || 
defined(CONFIG_FB_RPX)
io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, 
_PAGE_IO);
#endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
#endif
#ifdef CONFIG_PCI

I suppose you also want to include CONFIG_MPC885ADS in the 
io_block_mapping(IO_BASE) here?
No, not at the moment at least.
Actually, the patch doesn't even #define IO_BASE.
In 2.4 that io_block_mapping(IO_BASE) was needed for PCMCIA / CF cards to 
work.
We haven't got to PCMCIA support in 2.6 yet, and PCMCIA is unlikely to work
as is in case of MPC885ADS, as drivers/pcmcia/m8xx_pcmcia.c is just missing.
We plan to address PCMCIA later.
Lets just drop that hunk then..

-- 
Tom Rini
http://gate.crashing.org/~trini/

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Andrei Konovalov <hidden>
Date: 2005-06-24 16:21:50

Tom Rini wrote:
On Fri, Jun 24, 2005 at 07:21:37PM +0400, Andrei Konovalov wrote:
quoted
Hi Marcelo,

Marcelo Tosatti wrote:
quoted
Hi Andrei,

On Thu, Jun 23, 2005 at 07:38:54PM +0400, Andrei Konovalov wrote:
<snip>
quoted
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -369,7 +369,7 @@ m8xx_map_io(void)
#if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || 
defined(CONFIG_FB_RPX)
io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, 
_PAGE_IO);
#endif
-#ifdef CONFIG_FADS
+#if defined(CONFIG_FADS) || defined(CONFIG_MPC885ADS)
io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
#endif
#ifdef CONFIG_PCI

I suppose you also want to include CONFIG_MPC885ADS in the 
io_block_mapping(IO_BASE) here?
No, not at the moment at least.
Actually, the patch doesn't even #define IO_BASE.
In 2.4 that io_block_mapping(IO_BASE) was needed for PCMCIA / CF cards to 
work.
We haven't got to PCMCIA support in 2.6 yet, and PCMCIA is unlikely to work
as is in case of MPC885ADS, as drivers/pcmcia/m8xx_pcmcia.c is just missing.
We plan to address PCMCIA later.

Lets just drop that hunk then..
Do you mean not to use
   io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
?

Thanks,
Andrei

Re: [PATCH] ppc32: add Freescale MPC885ADS board support

From: Tom Rini <hidden>
Date: 2005-06-24 16:58:52

On Fri, Jun 24, 2005 at 08:29:02PM +0400, Andrei Konovalov wrote:
Tom Rini wrote:
[snip]
quoted
Lets just drop that hunk then..
Do you mean not to use
  io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
So I had myself slightly confused as first, but yes, what Eugene said at
first is right, as shouldn't add more io_block_mappings, we should use
ioremap() and fix drivers.

-- 
Tom Rini
http://gate.crashing.org/~trini/

Re: [PATCH] ppc32: add Freescale MPC885ADS board support - new MPC885ADS patch plus updated MPC86xADS

From: Andrei Konovalov <hidden>
Date: 2005-06-29 09:58:36

Tom Rini wrote:
On Fri, Jun 24, 2005 at 08:29:02PM +0400, Andrei Konovalov wrote:
quoted
Tom Rini wrote:
[snip]
quoted
quoted
Lets just drop that hunk then..
Do you mean not to use
 io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);

So I had myself slightly confused as first, but yes, what Eugene said at
first is right, as shouldn't add more io_block_mappings, we should use
ioremap() and fix drivers.
The hunk is removed, ioremap's added to the drivers.
Additionally, a misprint in cpm_uart_cpm1.c is fixed:
-       cp->cp_pedir &= 0x00000c00;
+       cp->cp_pedir &= ~0x00000c00;

The MPC885ADS patch expects the MPC86xADS patch to be applied first.
The updated to the latest git MPC86xADS patch is attached as well
just in case (no changes except those to account for arch/ppc/Kconfig
modification since the previous patch dated June 23).

Andrew,
If none objects please consider applying the patches.

Thanks,
Andrei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help