All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] OMAP3: make gpmc_config as const
Date: Sun, 11 Oct 2009 09:54:17 +0200	[thread overview]
Message-ID: <4AD18F29.20100@googlemail.com> (raw)
In-Reply-To: <1254881879-19257-4-git-send-email-nm@ti.com>

Nishanth Menon wrote:
> gpmc_config should not be a variant as it is board specific
> hence make it a const parameter

Having this in u-boot-ti/next results in

- All non-SDP3430 boards have

mem.c: In function 'gpmc_init':
mem.c:250: warning: assignment discards qualifiers from pointer target 
type

- Zoom2 fails to build with

zoom2.c:54: error: conflicting types for 'enable_gpmc_cs_config'
/include/asm/arch/sys_proto.h:38: error: previous declaration of 
'enable_gpmc_cs_config' was here

Reverting this patch makes both go away.

Then we get

sdp.c: In function 'board_init':
sdp.c:109: warning: passing argument 1 of 'enable_gpmc_cs_config' 
discards qualifiers from pointer target type
sdp.c:111: warning: passing argument 1 of 'enable_gpmc_cs_config' 
discards qualifiers from pointer target type
sdp.c:113: warning: passing argument 1 of 'enable_gpmc_cs_config' 
discards qualifiers from pointer target type
sdp.c:115: warning: passing argument 1 of 'enable_gpmc_cs_config' 
discards qualifiers from pointer target type

for SDP3430 only, though.

So I'd like to have this patch reverted in u-boot-ti/next and then

a) Fix sdp.c only

or

b) test the other boards, too, before applying this patch.

Best regards

Dirk

> Signed-off-by: Nishanth Menon <nm@ti.com>
> Cc: David B <david-b@pacbell.net>
> Cc: Vikram Pandita <vikram.pandita@ti.com>
> Cc: Richard Woodruff <r-woodruff2@ti.com>
> Cc: Sandeep Paulraj <s-paulraj@ti.com>
> Cc: Tom Rix <tom.rix@windriver.com>
> Cc: Dirk Behme <dirk.behme@googlemail.com>
> ---
>  cpu/arm_cortexa8/omap3/mem.c           |    6 +++---
>  include/asm-arm/arch-omap3/sys_proto.h |    2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
> index 8731c9d..8d64478 100644
> --- a/cpu/arm_cortexa8/omap3/mem.c
> +++ b/cpu/arm_cortexa8/omap3/mem.c
> @@ -44,7 +44,7 @@ volatile unsigned int boot_flash_env_addr;
>  struct gpmc *gpmc_cfg;
>  
>  #if defined(CONFIG_CMD_NAND)
> -static u32 gpmc_m_nand[GPMC_MAX_REG] = {
> +static const u32 gpmc_m_nand[GPMC_MAX_REG] = {
>  	M_NAND_GPMC_CONFIG1,
>  	M_NAND_GPMC_CONFIG2,
>  	M_NAND_GPMC_CONFIG3,
> @@ -62,7 +62,7 @@ static u32 gpmc_m_nand[GPMC_MAX_REG] = {
>  #endif
>  
>  #if defined(CONFIG_CMD_ONENAND)
> -static u32 gpmc_onenand[GPMC_MAX_REG] = {
> +static const u32 gpmc_onenand[GPMC_MAX_REG] = {
>  	ONENAND_GPMC_CONFIG1,
>  	ONENAND_GPMC_CONFIG2,
>  	ONENAND_GPMC_CONFIG3,
> @@ -193,7 +193,7 @@ void do_sdrc_init(u32 cs, u32 early)
>  		writel(0, &sdrc_base->cs[cs].mcfg);
>  }
>  
> -void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
> +void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
>  			u32 size)
>  {
>  	writel(0, &cs->config7);
> diff --git a/include/asm-arm/arch-omap3/sys_proto.h b/include/asm-arm/arch-omap3/sys_proto.h
> index e59021e..34bd515 100644
> --- a/include/asm-arm/arch-omap3/sys_proto.h
> +++ b/include/asm-arm/arch-omap3/sys_proto.h
> @@ -34,7 +34,7 @@ void memif_init(void);
>  void sdrc_init(void);
>  void do_sdrc_init(u32, u32);
>  void gpmc_init(void);
> -void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
> +void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
>  			u32 size);
>  
>  void watchdog_init(void);

  parent reply	other threads:[~2009-10-11  7:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07  2:17 [U-Boot] [PATCH 0/5 v2] ARM:OMAP3:SDP3430 initial support Nishanth Menon
2009-10-07  2:17 ` [U-Boot] [PATCH 1/5 v2] OMAP3: Fix SDRC init Nishanth Menon
2009-10-07  2:17   ` [U-Boot] [PATCH 2/5] OMAP3: export enable_gpmc_cs_config to board files Nishanth Menon
2009-10-07  2:17     ` [U-Boot] [PATCH 3/5] OMAP3: make gpmc_config as const Nishanth Menon
2009-10-07  2:17       ` [U-Boot] [PATCH 4/5] OMAP3: fix warnings when NAND/ONENAND is not used Nishanth Menon
2009-10-07  2:17         ` [U-Boot] [PATCH 5/5 v2] ARM:OMAP3:SDP3430: initial support Nishanth Menon
2009-10-10 19:20         ` [U-Boot] [PATCH 4/5] OMAP3: fix warnings when NAND/ONENAND is not used Paulraj, Sandeep
2009-10-10 19:29       ` [U-Boot] [PATCH 3/5] OMAP3: make gpmc_config as const Paulraj, Sandeep
2009-10-11  7:54       ` Dirk Behme [this message]
2009-10-11 12:22         ` Paulraj, Sandeep
2009-10-11 14:35         ` Nishanth Menon
2009-10-11 14:48           ` Paulraj, Sandeep
2009-10-11 15:01             ` Nishanth Menon
2009-10-10 19:18     ` [U-Boot] [PATCH 2/5] OMAP3: export enable_gpmc_cs_config to board files Paulraj, Sandeep
2009-10-10 19:24   ` [U-Boot] [PATCH 1/5 v2] OMAP3: Fix SDRC init Paulraj, Sandeep
2009-10-19 14:53   ` Steve Sakoman
2009-10-19 14:55     ` Dirk Behme
2009-10-19 15:06       ` Steve Sakoman
2009-10-20  2:19         ` [U-Boot] OMAP3 DDR Fix patches (was Re: [PATCH 1/5 v2] OMAP3: Fix SDRC init) Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD18F29.20100@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.