diff mbox

[U-Boot,4/6] powerpc/p1021: add more P1021 defines.

Message ID 1296499317-26616-5-git-send-email-Haiying.Wang@freescale.com
State Superseded
Headers show

Commit Message

Haiying Wang Jan. 31, 2011, 6:41 p.m. UTC
From: Haiying Wang <Haiying.Wang@freescale.com>

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
---
 arch/powerpc/include/asm/immap_85xx.h |    6 ++++++
 arch/powerpc/include/asm/immap_qe.h   |    9 +++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk Jan. 31, 2011, 8:07 p.m. UTC | #1
Dear Haiying.Wang@freescale.com,

In message <1296499317-26616-5-git-send-email-Haiying.Wang@freescale.com> you wrote:
> From: Haiying Wang <Haiying.Wang@freescale.com>
> 
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
>  arch/powerpc/include/asm/immap_85xx.h |    6 ++++++
>  arch/powerpc/include/asm/immap_qe.h   |    9 +++++++--
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h
> index 6bd83ba..77e3629 100644
> --- a/arch/powerpc/include/asm/immap_85xx.h
> +++ b/arch/powerpc/include/asm/immap_85xx.h
> @@ -1948,6 +1948,12 @@ typedef struct ccsr_gur {
>  	u8	res10b[76];
>  	par_io_t qe_par_io[7];
>  	u8	res10c[1600];
> +#elif defined(CONFIG_P1021)
> +	u8      res10b1[12];
> +	u32     iovselsr;
> +	u8      res10b2[60];
> +	par_io_t qe_par_io[3];
> +	u8      res10c[1496];
>  #else

res10b1? Two levels of insertions already. Isn't it time to renumber
the reserved fields?


> @@ -601,13 +604,15 @@ extern qe_map_t *qe_immr;
>  #define QE_MURAM_SIZE		0x10000UL
>  #elif defined(CONFIG_MPC8569)
>  #define QE_MURAM_SIZE		0x20000UL
> +#elif defined(CONFIG_P1021)
> +#define QE_MURAM_SIZE          0x6000UL
>  #elif defined(CONFIG_MPC8360)
>  #define QE_MURAM_SIZE		0xc000UL
>  #elif defined(CONFIG_MPC832x)
>  #define QE_MURAM_SIZE		0x4000UL
>  #endif

Can you please keep the "if defined(..)" list sorted? Thanks.

Best regards,

Wolfgang Denk
Kumar Gala Jan. 31, 2011, 9:08 p.m. UTC | #2
On Jan 31, 2011, at 12:41 PM, <Haiying.Wang@freescale.com> <Haiying.Wang@freescale.com> wrote:

> From: Haiying Wang <Haiying.Wang@freescale.com>
> 
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> arch/powerpc/include/asm/immap_85xx.h |    6 ++++++
> arch/powerpc/include/asm/immap_qe.h   |    9 +++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h
> index 6bd83ba..77e3629 100644
> --- a/arch/powerpc/include/asm/immap_85xx.h
> +++ b/arch/powerpc/include/asm/immap_85xx.h
> @@ -1948,6 +1948,12 @@ typedef struct ccsr_gur {
> 	u8	res10b[76];
> 	par_io_t qe_par_io[7];
> 	u8	res10c[1600];
> +#elif defined(CONFIG_P1021)
> +	u8      res10b1[12];
> +	u32     iovselsr;
> +	u8      res10b2[60];
> +	par_io_t qe_par_io[3];
> +	u8      res10c[1496];
> #else
> 	u8	res10b[1868];
> #endif
> diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h
> index 531cfc8..0fffba2 100644
> --- a/arch/powerpc/include/asm/immap_qe.h
> +++ b/arch/powerpc/include/asm/immap_qe.h
> @@ -3,7 +3,7 @@
>  * The Internal Memory Map for devices with QE on them. This
>  * is the superset of all QE devices (8360, etc.).
>  *
> - * Copyright (c) 2006-2009 Freescale Semiconductor, Inc.
> + * Copyright (c) 2006-2011 Freescale Semiconductor, Inc.
>  * Author: Shlomi Gridih <gridish@freescale.com>
>  *
>  * This program is free software; you can redistribute  it and/or modify it
> @@ -588,6 +588,9 @@ typedef struct qe_immap {
> #elif defined(CONFIG_MPC8569)
> 	u8 muram[0x20000];	/* 0x1_0000 -  0x3_0000 Multi-user RAM */
> 	u8 res17[0x10000];	/* 0x3_0000 -  0x4_0000 */
> +#elif defined(CONFIG_P1021)
> +	u8 muram[0x06000];	/* 0x1_0000 -  0x1_6000 Multi-user RAM */
> +	u8 res17[0x1a000];	/* 0x1_6000 -  0x3_0000 */
> #else
> 	u8 muram[0xC000];	/* 0x110000 -  0x11C000 Multi-user RAM */
> 	u8 res17[0x24000];	/* 0x11C000 -  0x140000 */

Can we reduce this mess with using QE_MURAM_SIZE?

	u8 muram[QE_MURAM_SIZE];
	u8 res17[0xNNNN - QE_MURAM_SIZE];


> @@ -601,13 +604,15 @@ extern qe_map_t *qe_immr;
> #define QE_MURAM_SIZE		0x10000UL
> #elif defined(CONFIG_MPC8569)
> #define QE_MURAM_SIZE		0x20000UL
> +#elif defined(CONFIG_P1021)
> +#define QE_MURAM_SIZE          0x6000UL
> #elif defined(CONFIG_MPC8360)
> #define QE_MURAM_SIZE		0xc000UL
> #elif defined(CONFIG_MPC832x)
> #define QE_MURAM_SIZE		0x4000UL
> #endif
> 
> -#if defined(CONFIG_MPC8323)
> +#if defined(CONFIG_MPC8323) || defined(CONFIG_P1021)
> #define MAX_QE_RISC     1
> #define QE_NUM_OF_SNUM	28
> #elif defined(CONFIG_MPC8569)

We can move some of these into include/config_mpc85xx.h

> -- 
> 1.7.3.1.50.g1e633
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Timur Tabi Jan. 31, 2011, 11:36 p.m. UTC | #3
On Mon, Jan 31, 2011 at 3:08 PM, Kumar Gala <galak@kernel.crashing.org> wrote:

>> @@ -588,6 +588,9 @@ typedef struct qe_immap {
>> #elif defined(CONFIG_MPC8569)
>>       u8 muram[0x20000];      /* 0x1_0000 -  0x3_0000 Multi-user RAM */
>>       u8 res17[0x10000];      /* 0x3_0000 -  0x4_0000 */
>> +#elif defined(CONFIG_P1021)
>> +     u8 muram[0x06000];      /* 0x1_0000 -  0x1_6000 Multi-user RAM */
>> +     u8 res17[0x1a000];      /* 0x1_6000 -  0x3_0000 */
>> #else
>>       u8 muram[0xC000];       /* 0x110000 -  0x11C000 Multi-user RAM */
>>       u8 res17[0x24000];      /* 0x11C000 -  0x140000 */
>
> Can we reduce this mess with using QE_MURAM_SIZE?
>
>        u8 muram[QE_MURAM_SIZE];
>        u8 res17[0xNNNN - QE_MURAM_SIZE];

I don't think we need res17, because nothing references it.  That will
simplify it even more.
Kumar Gala Feb. 1, 2011, 4:04 a.m. UTC | #4
On Jan 31, 2011, at 5:36 PM, Timur Tabi wrote:

> On Mon, Jan 31, 2011 at 3:08 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
> 
>>> @@ -588,6 +588,9 @@ typedef struct qe_immap {
>>> #elif defined(CONFIG_MPC8569)
>>>       u8 muram[0x20000];      /* 0x1_0000 -  0x3_0000 Multi-user RAM */
>>>       u8 res17[0x10000];      /* 0x3_0000 -  0x4_0000 */
>>> +#elif defined(CONFIG_P1021)
>>> +     u8 muram[0x06000];      /* 0x1_0000 -  0x1_6000 Multi-user RAM */
>>> +     u8 res17[0x1a000];      /* 0x1_6000 -  0x3_0000 */
>>> #else
>>>       u8 muram[0xC000];       /* 0x110000 -  0x11C000 Multi-user RAM */
>>>       u8 res17[0x24000];      /* 0x11C000 -  0x140000 */
>> 
>> Can we reduce this mess with using QE_MURAM_SIZE?
>> 
>>        u8 muram[QE_MURAM_SIZE];
>>        u8 res17[0xNNNN - QE_MURAM_SIZE];
> 
> I don't think we need res17, because nothing references it.  That will
> simplify it even more.

Looks like qe_immap isn't embedded anywhere so should be ok (was concerned if the struct is expected to be a given size.

- k
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h
index 6bd83ba..77e3629 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -1948,6 +1948,12 @@  typedef struct ccsr_gur {
 	u8	res10b[76];
 	par_io_t qe_par_io[7];
 	u8	res10c[1600];
+#elif defined(CONFIG_P1021)
+	u8      res10b1[12];
+	u32     iovselsr;
+	u8      res10b2[60];
+	par_io_t qe_par_io[3];
+	u8      res10c[1496];
 #else
 	u8	res10b[1868];
 #endif
diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h
index 531cfc8..0fffba2 100644
--- a/arch/powerpc/include/asm/immap_qe.h
+++ b/arch/powerpc/include/asm/immap_qe.h
@@ -3,7 +3,7 @@ 
  * The Internal Memory Map for devices with QE on them. This
  * is the superset of all QE devices (8360, etc.).
  *
- * Copyright (c) 2006-2009 Freescale Semiconductor, Inc.
+ * Copyright (c) 2006-2011 Freescale Semiconductor, Inc.
  * Author: Shlomi Gridih <gridish@freescale.com>
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -588,6 +588,9 @@  typedef struct qe_immap {
 #elif defined(CONFIG_MPC8569)
 	u8 muram[0x20000];	/* 0x1_0000 -  0x3_0000 Multi-user RAM */
 	u8 res17[0x10000];	/* 0x3_0000 -  0x4_0000 */
+#elif defined(CONFIG_P1021)
+	u8 muram[0x06000];	/* 0x1_0000 -  0x1_6000 Multi-user RAM */
+	u8 res17[0x1a000];	/* 0x1_6000 -  0x3_0000 */
 #else
 	u8 muram[0xC000];	/* 0x110000 -  0x11C000 Multi-user RAM */
 	u8 res17[0x24000];	/* 0x11C000 -  0x140000 */
@@ -601,13 +604,15 @@  extern qe_map_t *qe_immr;
 #define QE_MURAM_SIZE		0x10000UL
 #elif defined(CONFIG_MPC8569)
 #define QE_MURAM_SIZE		0x20000UL
+#elif defined(CONFIG_P1021)
+#define QE_MURAM_SIZE          0x6000UL
 #elif defined(CONFIG_MPC8360)
 #define QE_MURAM_SIZE		0xc000UL
 #elif defined(CONFIG_MPC832x)
 #define QE_MURAM_SIZE		0x4000UL
 #endif
 
-#if defined(CONFIG_MPC8323)
+#if defined(CONFIG_MPC8323) || defined(CONFIG_P1021)
 #define MAX_QE_RISC     1
 #define QE_NUM_OF_SNUM	28
 #elif defined(CONFIG_MPC8569)