All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function
Date: Tue, 08 Jan 2013 12:52:42 +0100	[thread overview]
Message-ID: <50EC088A.9050306@denx.de> (raw)
In-Reply-To: <1357643936-29365-1-git-send-email-r.sricharan@ti.com>

On 01/08/2013 12:18 PM, R Sricharan wrote:
> Introduce a weak version of dram_bank_setup function
> to allow a platform specific redefinition.
> 
> This is used in the subsequent patch to setup dram region
> without 'XN' attribute in order to enable the region
> under client permissions.
> 
> Signed-off-by: R Sricharan <r.sricharan@ti.com>
> Cc: Vincent Stehle <v-stehle@ti.com>
> Cc: Tom Rini <trini@ti.com>
> ---
>  arch/arm/include/asm/cache.h |    1 +
>  arch/arm/lib/cache-cp15.c    |    7 ++++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
> index eef6a5a..93811d2 100644
> --- a/arch/arm/include/asm/cache.h
> +++ b/arch/arm/include/asm/cache.h
> @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void)
>  void l2_cache_enable(void);
>  void l2_cache_disable(void);
>  
> +void dram_bank_mmu_setup(int bank);
>  /*
>   * The current upper bound for ARM L1 data cache line sizes is 64 bytes.  We
>   * use that value for aligning DMA buffers unless the board config has specified
> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
> index 6edf815..843078e 100644
> --- a/arch/arm/lib/cache-cp15.c
> +++ b/arch/arm/lib/cache-cp15.c
> @@ -23,6 +23,8 @@
>  
>  #include <common.h>
>  #include <asm/system.h>
> +#include <asm/cache.h>
> +#include <linux/compiler.h>
>  
>  #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
>  
> @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size,
>  	mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]);
>  }
>  
> -static inline void dram_bank_mmu_setup(int bank)
> +void __dram_bank_mmu_setup(int bank)
>  {
>  	bd_t *bd = gd->bd;
>  	int	i;
> @@ -94,6 +96,9 @@ static inline void dram_bank_mmu_setup(int bank)
>  	}
>  }
>  
> +void dram_bank_mmu_setup(int bank)
> +	__attribute__((weak, alias("__dram_bank_mmu_setup")));

Please use this instead (you already included linux/compiler.h for this):

__weak void dram_bank_mmu_setup(int bank)
{
...


Thanks,
Stefan

  parent reply	other threads:[~2013-01-08 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 11:18 [U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function R Sricharan
2013-01-08 11:18 ` [U-Boot] [RFC PATCH 2/2] ARM: mmu: Set domain permissions to client access R Sricharan
2013-01-08 11:52 ` Stefan Roese [this message]
2013-01-08 13:03   ` [U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function R Sricharan

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=50EC088A.9050306@denx.de \
    --to=sr@denx.de \
    --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.