* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
@ 2009-05-06 13:00 Matthias Ludwig
2009-05-06 14:55 ` Dirk Behme
0 siblings, 1 reply; 19+ messages in thread
From: Matthias Ludwig @ 2009-05-06 13:00 UTC (permalink / raw)
To: u-boot
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
---
board/omap3/evm/evm.c | 16 ++++++++--------
include/asm-arm/arch-omap3/cpu.h | 5 +++--
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
index c008c2e..5fd5efa 100644
--- a/board/omap3/evm/evm.c
+++ b/board/omap3/evm/evm.c
@@ -92,17 +92,17 @@ void set_muxconf_regs(void)
static void setup_net_chip(void)
{
gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
- gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
+ gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
/* Configure GPMC registers */
- writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
- writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
- writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
- writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
- writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
- writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
- writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
+ writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
+ writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
+ writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
+ writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
+ writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
+ writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
+ writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
index c544e0c..a4ce45a 100644
--- a/include/asm-arm/arch-omap3/cpu.h
+++ b/include/asm-arm/arch-omap3/cpu.h
@@ -84,9 +84,10 @@ typedef struct ctrl_id {
/* GPMC CS3/cs4/cs6 not avaliable */
#define GPMC_BASE (OMAP34XX_GPMC_BASE)
#define GPMC_CONFIG_CS0 0x60
-#define GPMC_CONFIG_CS6 0x150
+#define GPMC_CONFIG_CS5 0x150
+
#define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
-#define GPMC_CONFIG_CS6_BASE (GPMC_BASE + GPMC_CONFIG_CS6)
+#define GPMC_CONFIG_CS5_BASE (GPMC_BASE + GPMC_CONFIG_CS5)
#define GPMC_CONFIG_WP 0x10
#define GPMC_CONFIG_WIDTH 0x30
--
1.6.3.rc4.29.g8146
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-06 13:00 [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6 Matthias Ludwig
@ 2009-05-06 14:55 ` Dirk Behme
2009-05-07 7:04 ` Pillai, Manikandan
0 siblings, 1 reply; 19+ messages in thread
From: Dirk Behme @ 2009-05-06 14:55 UTC (permalink / raw)
To: u-boot
Matthias Ludwig wrote:
> Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Matthias: Thanks for fixing this!
Mani: Can we get your ack as EVM maintainer?
Many thanks and best regards
Dirk
> ---
> board/omap3/evm/evm.c | 16 ++++++++--------
> include/asm-arm/arch-omap3/cpu.h | 5 +++--
> 2 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
> index c008c2e..5fd5efa 100644
> --- a/board/omap3/evm/evm.c
> +++ b/board/omap3/evm/evm.c
> @@ -92,17 +92,17 @@ void set_muxconf_regs(void)
> static void setup_net_chip(void)
> {
> gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
> - gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
> + gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
> ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
>
> /* Configure GPMC registers */
> - writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
> - writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
> - writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
> - writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
> - writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
> - writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
> - writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
> + writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> + writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
> + writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
> + writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
> + writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
> + writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
> + writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
>
> /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
> diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
> index c544e0c..a4ce45a 100644
> --- a/include/asm-arm/arch-omap3/cpu.h
> +++ b/include/asm-arm/arch-omap3/cpu.h
> @@ -84,9 +84,10 @@ typedef struct ctrl_id {
> /* GPMC CS3/cs4/cs6 not avaliable */
> #define GPMC_BASE (OMAP34XX_GPMC_BASE)
> #define GPMC_CONFIG_CS0 0x60
> -#define GPMC_CONFIG_CS6 0x150
> +#define GPMC_CONFIG_CS5 0x150
> +
> #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
> -#define GPMC_CONFIG_CS6_BASE (GPMC_BASE + GPMC_CONFIG_CS6)
> +#define GPMC_CONFIG_CS5_BASE (GPMC_BASE + GPMC_CONFIG_CS5)
> #define GPMC_CONFIG_WP 0x10
>
> #define GPMC_CONFIG_WIDTH 0x30
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-06 14:55 ` Dirk Behme
@ 2009-05-07 7:04 ` Pillai, Manikandan
2009-05-07 7:11 ` Matthias Ludwig
0 siblings, 1 reply; 19+ messages in thread
From: Pillai, Manikandan @ 2009-05-07 7:04 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Dirk Behme [mailto:dirk.behme at googlemail.com]
> Sent: Wednesday, May 06, 2009 8:25 PM
> To: Matthias Ludwig; Pillai, Manikandan
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
>
> Matthias Ludwig wrote:
> > Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
>
> Matthias: Thanks for fixing this!
[Pillai, Manikandan] not sure why this change in the Chip select
>
> Mani: Can we get your ack as EVM maintainer?
>
> Many thanks and best regards
>
> Dirk
>
> > ---
> > board/omap3/evm/evm.c | 16 ++++++++--------
> > include/asm-arm/arch-omap3/cpu.h | 5 +++--
> > 2 files changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
> > index c008c2e..5fd5efa 100644
> > --- a/board/omap3/evm/evm.c
> > +++ b/board/omap3/evm/evm.c
> > @@ -92,17 +92,17 @@ void set_muxconf_regs(void)
> > static void setup_net_chip(void)
> > {
> > gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
> > - gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
> > + gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
> > ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
> >
> > /* Configure GPMC registers */
> > - writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
> > - writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
> > - writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
> > - writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
> > - writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
> > - writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
> > - writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
> > + writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> > + writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
> > + writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
> > + writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
> > + writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
> > + writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
> > + writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
> >
> > /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> > writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
> > diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-
> omap3/cpu.h
> > index c544e0c..a4ce45a 100644
> > --- a/include/asm-arm/arch-omap3/cpu.h
> > +++ b/include/asm-arm/arch-omap3/cpu.h
> > @@ -84,9 +84,10 @@ typedef struct ctrl_id {
> > /* GPMC CS3/cs4/cs6 not avaliable */
> > #define GPMC_BASE (OMAP34XX_GPMC_BASE)
> > #define GPMC_CONFIG_CS0 0x60
> > -#define GPMC_CONFIG_CS6 0x150
> > +#define GPMC_CONFIG_CS5 0x150
> > +
> > #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
> > -#define GPMC_CONFIG_CS6_BASE (GPMC_BASE + GPMC_CONFIG_CS6)
> > +#define GPMC_CONFIG_CS5_BASE (GPMC_BASE + GPMC_CONFIG_CS5)
> > #define GPMC_CONFIG_WP 0x10
> >
> > #define GPMC_CONFIG_WIDTH 0x30
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 7:04 ` Pillai, Manikandan
@ 2009-05-07 7:11 ` Matthias Ludwig
2009-05-07 7:15 ` Pillai, Manikandan
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Matthias Ludwig @ 2009-05-07 7:11 UTC (permalink / raw)
To: u-boot
This is not really a change. The cs configuration was correct, but not
the naming of it.
OMAP34XX_GPMC_BASE (0x6e000000) + 0x150 = base address of configuration
registers for GPMC-CS5 not GPMC-CS6.
best regards,
Matthias
On Thu, May 07, 2009 at 12:34:01PM +0530, Pillai, Manikandan wrote:
>
>
> > -----Original Message-----
> > From: Dirk Behme [mailto:dirk.behme at googlemail.com]
> > Sent: Wednesday, May 06, 2009 8:25 PM
> > To: Matthias Ludwig; Pillai, Manikandan
> > Cc: u-boot at lists.denx.de
> > Subject: Re: [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
> >
> > Matthias Ludwig wrote:
> > > Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
> >
> > Matthias: Thanks for fixing this!
> [Pillai, Manikandan] not sure why this change in the Chip select
>
> >
> > Mani: Can we get your ack as EVM maintainer?
> >
> > Many thanks and best regards
> >
> > Dirk
> >
> > > ---
> > > board/omap3/evm/evm.c | 16 ++++++++--------
> > > include/asm-arm/arch-omap3/cpu.h | 5 +++--
> > > 2 files changed, 11 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
> > > index c008c2e..5fd5efa 100644
> > > --- a/board/omap3/evm/evm.c
> > > +++ b/board/omap3/evm/evm.c
> > > @@ -92,17 +92,17 @@ void set_muxconf_regs(void)
> > > static void setup_net_chip(void)
> > > {
> > > gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
> > > - gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
> > > + gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
> > > ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
> > >
> > > /* Configure GPMC registers */
> > > - writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
> > > - writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
> > > - writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
> > > - writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
> > > - writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
> > > - writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
> > > - writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
> > > + writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> > > + writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
> > > + writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
> > > + writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
> > > + writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
> > > + writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
> > > + writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
> > >
> > > /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> > > writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
> > > diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-
> > omap3/cpu.h
> > > index c544e0c..a4ce45a 100644
> > > --- a/include/asm-arm/arch-omap3/cpu.h
> > > +++ b/include/asm-arm/arch-omap3/cpu.h
> > > @@ -84,9 +84,10 @@ typedef struct ctrl_id {
> > > /* GPMC CS3/cs4/cs6 not avaliable */
> > > #define GPMC_BASE (OMAP34XX_GPMC_BASE)
> > > #define GPMC_CONFIG_CS0 0x60
> > > -#define GPMC_CONFIG_CS6 0x150
> > > +#define GPMC_CONFIG_CS5 0x150
> > > +
> > > #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
> > > -#define GPMC_CONFIG_CS6_BASE (GPMC_BASE + GPMC_CONFIG_CS6)
> > > +#define GPMC_CONFIG_CS5_BASE (GPMC_BASE + GPMC_CONFIG_CS5)
> > > #define GPMC_CONFIG_WP 0x10
> > >
> > > #define GPMC_CONFIG_WIDTH 0x30
> >
>
--
Matthias Ludwig, Software Development
Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany
http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183
Registergericht Muenchen, HRB 55584
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 7:11 ` Matthias Ludwig
@ 2009-05-07 7:15 ` Pillai, Manikandan
2009-05-07 8:36 ` Wolfgang Denk
2009-05-07 20:57 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 0 replies; 19+ messages in thread
From: Pillai, Manikandan @ 2009-05-07 7:15 UTC (permalink / raw)
To: u-boot
ACKed
> -----Original Message-----
> From: Matthias Ludwig [mailto:mludwig at ultratronik.de]
> Sent: Thursday, May 07, 2009 12:42 PM
> To: Pillai, Manikandan
> Cc: Dirk Behme; u-boot at lists.denx.de
> Subject: Re: [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
>
> This is not really a change. The cs configuration was correct, but not
> the naming of it.
>
> OMAP34XX_GPMC_BASE (0x6e000000) + 0x150 = base address of configuration
> registers for GPMC-CS5 not GPMC-CS6.
>
> best regards,
> Matthias
>
>
> On Thu, May 07, 2009 at 12:34:01PM +0530, Pillai, Manikandan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Dirk Behme [mailto:dirk.behme at googlemail.com]
> > > Sent: Wednesday, May 06, 2009 8:25 PM
> > > To: Matthias Ludwig; Pillai, Manikandan
> > > Cc: u-boot at lists.denx.de
> > > Subject: Re: [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
> > >
> > > Matthias Ludwig wrote:
> > > > Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
> > >
> > > Matthias: Thanks for fixing this!
> > [Pillai, Manikandan] not sure why this change in the Chip select
> >
> > >
> > > Mani: Can we get your ack as EVM maintainer?
> > >
> > > Many thanks and best regards
> > >
> > > Dirk
> > >
> > > > ---
> > > > board/omap3/evm/evm.c | 16 ++++++++--------
> > > > include/asm-arm/arch-omap3/cpu.h | 5 +++--
> > > > 2 files changed, 11 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
> > > > index c008c2e..5fd5efa 100644
> > > > --- a/board/omap3/evm/evm.c
> > > > +++ b/board/omap3/evm/evm.c
> > > > @@ -92,17 +92,17 @@ void set_muxconf_regs(void)
> > > > static void setup_net_chip(void)
> > > > {
> > > > gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
> > > > - gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
> > > > + gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
> > > > ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
> > > >
> > > > /* Configure GPMC registers */
> > > > - writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
> > > > - writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
> > > > - writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
> > > > - writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
> > > > - writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
> > > > - writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
> > > > - writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
> > > > + writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> > > > + writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
> > > > + writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
> > > > + writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
> > > > + writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
> > > > + writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
> > > > + writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
> > > >
> > > > /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> > > > writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base-
> >gpmc_nwe);
> > > > diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-
> > > omap3/cpu.h
> > > > index c544e0c..a4ce45a 100644
> > > > --- a/include/asm-arm/arch-omap3/cpu.h
> > > > +++ b/include/asm-arm/arch-omap3/cpu.h
> > > > @@ -84,9 +84,10 @@ typedef struct ctrl_id {
> > > > /* GPMC CS3/cs4/cs6 not avaliable */
> > > > #define GPMC_BASE (OMAP34XX_GPMC_BASE)
> > > > #define GPMC_CONFIG_CS0 0x60
> > > > -#define GPMC_CONFIG_CS6 0x150
> > > > +#define GPMC_CONFIG_CS5 0x150
> > > > +
> > > > #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
> > > > -#define GPMC_CONFIG_CS6_BASE (GPMC_BASE + GPMC_CONFIG_CS6)
> > > > +#define GPMC_CONFIG_CS5_BASE (GPMC_BASE + GPMC_CONFIG_CS5)
> > > > #define GPMC_CONFIG_WP 0x10
> > > >
> > > > #define GPMC_CONFIG_WIDTH 0x30
> > >
> >
>
> --
> Matthias Ludwig, Software Development
> Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany
> http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183
> Registergericht Muenchen, HRB 55584
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 7:11 ` Matthias Ludwig
2009-05-07 7:15 ` Pillai, Manikandan
@ 2009-05-07 8:36 ` Wolfgang Denk
2009-05-07 15:16 ` Dirk Behme
2009-05-07 20:57 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 1 reply; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-07 8:36 UTC (permalink / raw)
To: u-boot
Dear Matthias Ludwig,
In message <20090507071155.GA8961@ultratronik.de> you wrote:
> This is not really a change. The cs configuration was correct, but not
> the naming of it.
>
> OMAP34XX_GPMC_BASE (0x6e000000) + 0x150 = base address of configuration
> registers for GPMC-CS5 not GPMC-CS6.
Can we please get rid of all this crap with register offsets and
device accesses through pointers using base address plus offset?
Please provide proper C structs!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Wish not to seem, but to be, the best." - Aeschylus
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 8:36 ` Wolfgang Denk
@ 2009-05-07 15:16 ` Dirk Behme
2009-05-07 18:58 ` Wolfgang Denk
0 siblings, 1 reply; 19+ messages in thread
From: Dirk Behme @ 2009-05-07 15:16 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
Wolfgang Denk wrote:
> Dear Matthias Ludwig,
>
> In message <20090507071155.GA8961@ultratronik.de> you wrote:
>> This is not really a change. The cs configuration was correct, but not
>> the naming of it.
>>
>> OMAP34XX_GPMC_BASE (0x6e000000) + 0x150 = base address of configuration
>> registers for GPMC-CS5 not GPMC-CS6.
>
> Can we please get rid of all this crap with register offsets and
> device accesses through pointers using base address plus offset?
>
> Please provide proper C structs!
Would you like to have a look to the code snippet visible in Matthias'
patch
http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
?
It's my understanding that what's in code
writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
is what you want? I.e. as I understand it, the code is correct (we use
C structs), and the style Matthias used above you complain about was
just for patch explanation (to make it easier understandable).
Sorry if I missed something, just correct then ;)
Best regards
Dirk
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 15:16 ` Dirk Behme
@ 2009-05-07 18:58 ` Wolfgang Denk
2009-05-07 19:18 ` Scott Wood
2009-05-08 8:42 ` Matthias Ludwig
0 siblings, 2 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-07 18:58 UTC (permalink / raw)
To: u-boot
Dear Dirk,
In message <4A02FB34.2090907@googlemail.com> you wrote:
>
> > Please provide proper C structs!
>
> Would you like to have a look to the code snippet visible in Matthias'
> patch
>
> http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
>
> ?
Done.
> It's my understanding that what's in code
>
> writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
>
> is what you want? I.e. as I understand it, the code is correct (we use
It is only part of what I want to see. There are still deficiencies.
Yes, we have a struct gpmc_csx, that's good.
Note though that using such typedef's not in line with the Coding
Style, which says: "It's a _mistake_ to use typedef for structures
and pointers." Also, checkpatch.pl complains about this.
The next problem is that the entries in these structs are declared as
"unsigned int", which just happens to work by chance. "u32" would be
more reliable.
Finally, and this is what I really compalin about, is that there is no
big structure which includes all the blocks that make up the CPU into
one big structure (as it's done for example for PowerPC systems in the
include/asm-ppc/*immap* files) - you still use code like
gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
to locate each of the individual C structs in the memory map; instead,
onle one single pointer to the internal memory should be needed.
> Sorry if I missed something, just correct then ;)
Done. Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Winners never talk about glorious victories. That's because they're
the ones who see what the battlefield looks like afterwards. It's
only the losers who have glorious victories.
- Terry Pratchett, _Small Gods_
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 18:58 ` Wolfgang Denk
@ 2009-05-07 19:18 ` Scott Wood
2009-05-07 20:42 ` Wolfgang Denk
2009-05-08 8:42 ` Matthias Ludwig
1 sibling, 1 reply; 19+ messages in thread
From: Scott Wood @ 2009-05-07 19:18 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Finally, and this is what I really compalin about, is that there is no
> big structure which includes all the blocks that make up the CPU into
> one big structure (as it's done for example for PowerPC systems in the
> include/asm-ppc/*immap* files) - you still use code like
Those immap structs are a huge pain to maintain (or to verify the
correctness of), loaded with ifdeffery and magic numbers describing
reserved spans. We should not be emulating them.
We used to have them in Linux, and got rid of them.
-Scott
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 19:18 ` Scott Wood
@ 2009-05-07 20:42 ` Wolfgang Denk
2009-05-07 20:56 ` Scott Wood
0 siblings, 1 reply; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-07 20:42 UTC (permalink / raw)
To: u-boot
Dear Scott,
In message <4A0333FC.6090900@freescale.com> you wrote:
> Wolfgang Denk wrote:
> > Finally, and this is what I really compalin about, is that there is no
> > big structure which includes all the blocks that make up the CPU into
> > one big structure (as it's done for example for PowerPC systems in the
> > include/asm-ppc/*immap* files) - you still use code like
>
> Those immap structs are a huge pain to maintain (or to verify the
> correctness of), loaded with ifdeffery and magic numbers describing
> reserved spans. We should not be emulating them.
Well, #define'ing long lists of register offsets is not easier to
maintain or verify, and you don't have any typechecking by the
compiler.
> We used to have them in Linux, and got rid of them.
Hm... Seems I have missed this change... What's things like
struct qe_immap __iomem *qe_immr
or
cpm2_map_t __iomem *cpm2_immr
or
immap_t __iomem *mpc8xx_immr
then? Or what replaced the "immr" structs?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The manager will be continually amazed that policies he took for com-
mon knowledge are totally unknown by some member of his team. Since
his fundamental job is to keep everybody going in the same direction,
his chief daily task will be communication, not decision-making.
- Fred Brooks, "The Mythical Man Month"
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 20:42 ` Wolfgang Denk
@ 2009-05-07 20:56 ` Scott Wood
2009-05-07 21:04 ` Wolfgang Denk
0 siblings, 1 reply; 19+ messages in thread
From: Scott Wood @ 2009-05-07 20:56 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear Scott,
>
> In message <4A0333FC.6090900@freescale.com> you wrote:
>> Wolfgang Denk wrote:
>>> Finally, and this is what I really compalin about, is that there is no
>>> big structure which includes all the blocks that make up the CPU into
>>> one big structure (as it's done for example for PowerPC systems in the
>>> include/asm-ppc/*immap* files) - you still use code like
>> Those immap structs are a huge pain to maintain (or to verify the
>> correctness of), loaded with ifdeffery and magic numbers describing
>> reserved spans. We should not be emulating them.
>
> Well, #define'ing long lists of register offsets is not easier to
> maintain or verify,
IMHO it is; you can just compare to the manual rather than have offsets
be screwed up if something is missing, out of order, or the wrong size.
That's countered by the typechecking and ease of use of structs, though.
> and you don't have any typechecking by the
> compiler.
It doesn't have to be all one or the other. Use structs to describe
individual blocks (provided they're not too sparsely populated), but
define block addresses rather than huge structs consisting of sub-blocks
and empty space. And let the details be flexible at the
author/maintainer's discretion, rather than a rigid rule.
>> We used to have them in Linux, and got rid of them.
>
> Hm... Seems I have missed this change... What's things like
>
> struct qe_immap __iomem *qe_immr
> or
> cpm2_map_t __iomem *cpm2_immr
> or
> immap_t __iomem *mpc8xx_immr
>
> then?
Legacy stuff that hasn't been fully cleaned up. There used to be immap
structs for 83xx and 85xx back in arch/ppc IIRC.
> Or what replaced the "immr" structs?
The device tree, mainly. But #defines can work for u-boot.
-Scott
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 7:11 ` Matthias Ludwig
2009-05-07 7:15 ` Pillai, Manikandan
2009-05-07 8:36 ` Wolfgang Denk
@ 2009-05-07 20:57 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-07 20:57 UTC (permalink / raw)
To: u-boot
On 09:11 Thu 07 May , Matthias Ludwig wrote:
> This is not really a change. The cs configuration was correct, but not
> the naming of it.
>
> OMAP34XX_GPMC_BASE (0x6e000000) + 0x150 = base address of configuration
> registers for GPMC-CS5 not GPMC-CS6.
so please fix the comment
Best Regards,
J.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 20:56 ` Scott Wood
@ 2009-05-07 21:04 ` Wolfgang Denk
2009-05-07 21:10 ` Scott Wood
0 siblings, 1 reply; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-07 21:04 UTC (permalink / raw)
To: u-boot
Dear Scott Wood,
In message <4A034B09.7030105@freescale.com> you wrote:
>
> > Or what replaced the "immr" structs?
>
> The device tree, mainly...
Right, of course.
> ... But #defines can work for u-boot.
Of course they _can_ work. But they can easily fail (as we just see
in this patch), and we don't have typechecking. So until DT's are
omnipresent, let's use structs in U-Boot, please.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When in doubt, mumble; when in trouble, delegate; when in charge,
ponder. -- James H. Boren
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 21:04 ` Wolfgang Denk
@ 2009-05-07 21:10 ` Scott Wood
2009-05-08 12:28 ` Detlev Zundel
0 siblings, 1 reply; 19+ messages in thread
From: Scott Wood @ 2009-05-07 21:10 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear Scott Wood,
>
> In message <4A034B09.7030105@freescale.com> you wrote:
>>> Or what replaced the "immr" structs?
>> The device tree, mainly...
>
> Right, of course.
>
>> ... But #defines can work for u-boot.
>
> Of course they _can_ work. But they can easily fail (as we just see
> in this patch), and we don't have typechecking. So until DT's are
> omnipresent, let's use structs in U-Boot, please.
You *do* have typechecking as long as the individual blocks are
described with structs.
We could take immap to extremes by defining one big 4GiB struct that
shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are --
but that would be silly. IMHO, so is doing it at the immr level. :-)
How would you deal with blocks being at different locations in different
chips? It's a lot easier to ifdef (or have the config file specify) a
couple addresses than to ifdef the locations of fields in a struct,
especially when you have more than a couple variations.
-Scott
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 18:58 ` Wolfgang Denk
2009-05-07 19:18 ` Scott Wood
@ 2009-05-08 8:42 ` Matthias Ludwig
2009-05-08 9:00 ` Wolfgang Denk
2009-05-08 15:12 ` Dirk Behme
1 sibling, 2 replies; 19+ messages in thread
From: Matthias Ludwig @ 2009-05-08 8:42 UTC (permalink / raw)
To: u-boot
Wolfgang, Dirk,
cause for this patch was originally the plan to bring my company's new
omap3-based platform into U-Boot. As we do use other CS for a network
chip this patch was intended to be the starting point (otherwise our
patchset will not apply).
I can prepare a big #define -> c_struct patch for omap next week.
The only problem i see, my following patches will be rebased onto that
and will only apply after the transition #define -> c_struct is done.
If this is ok for you i will submit this mid/end of next week.
best regards,
Matthias
On Thu, May 07, 2009 at 08:58:17PM +0200, Wolfgang Denk wrote:
> Dear Dirk,
>
> In message <4A02FB34.2090907@googlemail.com> you wrote:
> >
> > > Please provide proper C structs!
> >
> > Would you like to have a look to the code snippet visible in Matthias'
> > patch
> >
> > http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
> >
> > ?
>
> Done.
>
> > It's my understanding that what's in code
> >
> > writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> >
> > is what you want? I.e. as I understand it, the code is correct (we use
>
> It is only part of what I want to see. There are still deficiencies.
>
> Yes, we have a struct gpmc_csx, that's good.
>
> Note though that using such typedef's not in line with the Coding
> Style, which says: "It's a _mistake_ to use typedef for structures
> and pointers." Also, checkpatch.pl complains about this.
>
> The next problem is that the entries in these structs are declared as
> "unsigned int", which just happens to work by chance. "u32" would be
> more reliable.
>
> Finally, and this is what I really compalin about, is that there is no
> big structure which includes all the blocks that make up the CPU into
> one big structure (as it's done for example for PowerPC systems in the
> include/asm-ppc/*immap* files) - you still use code like
>
> gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
>
> to locate each of the individual C structs in the memory map; instead,
> onle one single pointer to the internal memory should be needed.
>
> > Sorry if I missed something, just correct then ;)
>
> Done. Thanks.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Winners never talk about glorious victories. That's because they're
> the ones who see what the battlefield looks like afterwards. It's
> only the losers who have glorious victories.
> - Terry Pratchett, _Small Gods_
--
Matthias Ludwig, Software Development
Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany
http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183
Registergericht Muenchen, HRB 55584
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-08 8:42 ` Matthias Ludwig
@ 2009-05-08 9:00 ` Wolfgang Denk
2009-05-08 15:12 ` Dirk Behme
1 sibling, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-08 9:00 UTC (permalink / raw)
To: u-boot
Dear Matthias,
In message <20090508084234.GA6403@ultratronik.de> you wrote:
>
> cause for this patch was originally the plan to bring my company's new
> omap3-based platform into U-Boot. As we do use other CS for a network
> chip this patch was intended to be the starting point (otherwise our
> patchset will not apply).
>
> I can prepare a big #define -> c_struct patch for omap next week.
> The only problem i see, my following patches will be rebased onto that
> and will only apply after the transition #define -> c_struct is done.
>
> If this is ok for you i will submit this mid/end of next week.
It's fine with me.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have yet to add the ESP-driver to the kernel to read the mind of
the user... - Linus Torvalds in
<Pine.LNX.3.91.960426110644.24860I-100000@linux.cs.Helsinki.FI>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-07 21:10 ` Scott Wood
@ 2009-05-08 12:28 ` Detlev Zundel
2009-05-08 15:10 ` Dirk Behme
0 siblings, 1 reply; 19+ messages in thread
From: Detlev Zundel @ 2009-05-08 12:28 UTC (permalink / raw)
To: u-boot
Hi,
> Wolfgang Denk wrote:
>> Dear Scott Wood,
>>
>> In message <4A034B09.7030105@freescale.com> you wrote:
>>>> Or what replaced the "immr" structs?
>>> The device tree, mainly...
>>
>> Right, of course.
>>
>>> ... But #defines can work for u-boot.
>>
>> Of course they _can_ work. But they can easily fail (as we just see
>> in this patch), and we don't have typechecking. So until DT's are
>> omnipresent, let's use structs in U-Boot, please.
>
> You *do* have typechecking as long as the individual blocks are
> described with structs.
>
> We could take immap to extremes by defining one big 4GiB struct that
> shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are --
> but that would be silly. IMHO, so is doing it at the immr level. :-)
>
> How would you deal with blocks being at different locations in different
> chips? It's a lot easier to ifdef (or have the config file specify) a
> couple addresses than to ifdef the locations of fields in a struct,
> especially when you have more than a couple variations.
For what its worth, I'm with Scott here. Structures for register blocks
is very nice and should be mandated and it seems they are maintainable.
Locations of individual blocks (or number of incarnations thereof) seem
to change frequently and thus tend to be less friendly to "whole
internal address space" structures. So the latter may better be mapped
by single defines. The correctness of them is easily validated and an
incorrect value will immediatley be discovered.
Cheers
Detlev
--
config LGUEST
If unsure, say N. If curious, say M. If masochistic, say Y.
-- linux/drivers/lguest/Kconfig
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-08 12:28 ` Detlev Zundel
@ 2009-05-08 15:10 ` Dirk Behme
0 siblings, 0 replies; 19+ messages in thread
From: Dirk Behme @ 2009-05-08 15:10 UTC (permalink / raw)
To: u-boot
Hi,
Detlev Zundel wrote:
> Hi,
>
>> Wolfgang Denk wrote:
>>> Dear Scott Wood,
>>>
>>> In message <4A034B09.7030105@freescale.com> you wrote:
>>>>> Or what replaced the "immr" structs?
>>>> The device tree, mainly...
>>> Right, of course.
>>>
>>>> ... But #defines can work for u-boot.
>>> Of course they _can_ work. But they can easily fail (as we just see
>>> in this patch), and we don't have typechecking. So until DT's are
>>> omnipresent, let's use structs in U-Boot, please.
>> You *do* have typechecking as long as the individual blocks are
>> described with structs.
>>
>> We could take immap to extremes by defining one big 4GiB struct that
>> shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are --
>> but that would be silly. IMHO, so is doing it at the immr level. :-)
>>
>> How would you deal with blocks being at different locations in different
>> chips? It's a lot easier to ifdef (or have the config file specify) a
>> couple addresses than to ifdef the locations of fields in a struct,
>> especially when you have more than a couple variations.
>
> For what its worth, I'm with Scott here. Structures for register blocks
> is very nice and should be mandated and it seems they are maintainable.
> Locations of individual blocks (or number of incarnations thereof) seem
> to change frequently and thus tend to be less friendly to "whole
> internal address space" structures. So the latter may better be mapped
> by single defines. The correctness of them is easily validated and an
> incorrect value will immediatley be discovered.
I tend to agree with Scott and Detlev, too. At least from practical
point of view
http://www.ti.com/litv/pdf/spruf98b
(attention: ~40MB) ;)
Best regards
Dirk
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6
2009-05-08 8:42 ` Matthias Ludwig
2009-05-08 9:00 ` Wolfgang Denk
@ 2009-05-08 15:12 ` Dirk Behme
1 sibling, 0 replies; 19+ messages in thread
From: Dirk Behme @ 2009-05-08 15:12 UTC (permalink / raw)
To: u-boot
Dear Matthias,
Matthias Ludwig wrote:
> Wolfgang, Dirk,
>
> cause for this patch was originally the plan to bring my company's new
> omap3-based platform into U-Boot. As we do use other CS for a network
> chip this patch was intended to be the starting point (otherwise our
> patchset will not apply).
>
> I can prepare a big #define -> c_struct patch for omap next week.
> The only problem i see, my following patches will be rebased onto that
> and will only apply after the transition #define -> c_struct is done.
>
> If this is ok for you i will submit this mid/end of next week.
If you do it for all OMAP3 boards currently in mainline and don't
break anything, I'm fine with this, too.
Many thanks
Dirk
> On Thu, May 07, 2009 at 08:58:17PM +0200, Wolfgang Denk wrote:
>> Dear Dirk,
>>
>> In message <4A02FB34.2090907@googlemail.com> you wrote:
>>>> Please provide proper C structs!
>>> Would you like to have a look to the code snippet visible in Matthias'
>>> patch
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
>>>
>>> ?
>> Done.
>>
>>> It's my understanding that what's in code
>>>
>>> writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
>>>
>>> is what you want? I.e. as I understand it, the code is correct (we use
>> It is only part of what I want to see. There are still deficiencies.
>>
>> Yes, we have a struct gpmc_csx, that's good.
>>
>> Note though that using such typedef's not in line with the Coding
>> Style, which says: "It's a _mistake_ to use typedef for structures
>> and pointers." Also, checkpatch.pl complains about this.
>>
>> The next problem is that the entries in these structs are declared as
>> "unsigned int", which just happens to work by chance. "u32" would be
>> more reliable.
>>
>> Finally, and this is what I really compalin about, is that there is no
>> big structure which includes all the blocks that make up the CPU into
>> one big structure (as it's done for example for PowerPC systems in the
>> include/asm-ppc/*immap* files) - you still use code like
>>
>> gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
>>
>> to locate each of the individual C structs in the memory map; instead,
>> onle one single pointer to the internal memory should be needed.
>>
>>> Sorry if I missed something, just correct then ;)
>> Done. Thanks.
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
>> --
>> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>> Winners never talk about glorious victories. That's because they're
>> the ones who see what the battlefield looks like afterwards. It's
>> only the losers who have glorious victories.
>> - Terry Pratchett, _Small Gods_
>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2009-05-08 15:12 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 13:00 [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6 Matthias Ludwig
2009-05-06 14:55 ` Dirk Behme
2009-05-07 7:04 ` Pillai, Manikandan
2009-05-07 7:11 ` Matthias Ludwig
2009-05-07 7:15 ` Pillai, Manikandan
2009-05-07 8:36 ` Wolfgang Denk
2009-05-07 15:16 ` Dirk Behme
2009-05-07 18:58 ` Wolfgang Denk
2009-05-07 19:18 ` Scott Wood
2009-05-07 20:42 ` Wolfgang Denk
2009-05-07 20:56 ` Scott Wood
2009-05-07 21:04 ` Wolfgang Denk
2009-05-07 21:10 ` Scott Wood
2009-05-08 12:28 ` Detlev Zundel
2009-05-08 15:10 ` Dirk Behme
2009-05-08 8:42 ` Matthias Ludwig
2009-05-08 9:00 ` Wolfgang Denk
2009-05-08 15:12 ` Dirk Behme
2009-05-07 20:57 ` Jean-Christophe PLAGNIOL-VILLARD
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.