[U-Boot] [PATCH 5/6] am335x_evm:Add support for the NOR module on the memory cape
Peter Korsgaard
jacmet at sunsite.dk
Sun May 12 23:19:47 CEST 2013
>>>>> "Tom" == Tom Rini <trini at ti.com> writes:
Space missing after ':' in subject.
Tom> From: Steve Kipisz <s-kipisz2 at ti.com>
Tom> This patch adds support for the NOR module that attaches
Tom> to the memory cape for a Beaglebone board. This does not
Tom> add booting support; only support so that you can boot from
Tom> SD/MMC and see the NOR module so that it can be programmed.
Tom> Signed-off-by: Steve Kipisz <s-kipisz2 at ti.com>
Tom> [trini: Clean up config changes slightly]
Tom> Signed-off-by: Tom Rini <trini at ti.com>
Tom> ---
Tom> arch/arm/cpu/armv7/am33xx/mem.c | 30 +++++++++++++++++-
Tom> arch/arm/include/asm/arch-am33xx/mem.h | 9 ++++++
Tom> board/ti/am335x/mux.c | 53 ++++++++++++++++++++++++++++++++
Tom> boards.cfg | 1 +
Tom> include/configs/am335x_evm.h | 28 +++++++++++++++++
Tom> 5 files changed, 120 insertions(+), 1 deletion(-)
Tom> diff --git a/arch/arm/cpu/armv7/am33xx/mem.c b/arch/arm/cpu/armv7/am33xx/mem.c
Tom> index b86b0de..e46201a 100644
Tom> --- a/arch/arm/cpu/armv7/am33xx/mem.c
Tom> +++ b/arch/arm/cpu/armv7/am33xx/mem.c
Tom> @@ -46,6 +46,19 @@ static const u32 gpmc_m_nand[GPMC_MAX_REG] = {
Tom> };
Tom> #endif
Tom> +#if defined(CONFIG_CMD_FLASH)
Tom> +static const u32 gpmc_nor[GPMC_MAX_REG] = {
Tom> + STNOR_GPMC_CONFIG1,
Tom> + STNOR_GPMC_CONFIG2,
Tom> + STNOR_GPMC_CONFIG3,
Tom> + STNOR_GPMC_CONFIG4,
Tom> + STNOR_GPMC_CONFIG5,
Tom> + STNOR_GPMC_CONFIG6,
Tom> + STNOR_GPMC_CONFIG7
Tom> +};
These values (and the gmpc_m_nand ones) are platform specific, right? It
would be nicer to have them in the board file than here, similar to how
I did for the ddr settings some time ago.
Tom> +
Tom> +#define GPMC_CS 0
Tom> +#endif
Tom> void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
Tom> u32 size)
Tom> @@ -75,16 +88,22 @@ void gpmc_init(void)
Tom> /* putting a blanket check on GPMC based on ZeBu for now */
Tom> gpmc_cfg = (struct gpmc *)GPMC_BASE;
Tom> -#ifdef CONFIG_CMD_NAND
Tom> +#if defined(CONFIG_CMD_NAND) || defined(CONFIG_NOR)
Tom> const u32 *gpmc_config = NULL;
Tom> u32 base = 0;
Tom> u32 size = 0;
Tom> #endif
Tom> /* global settings */
Tom> writel(0x00000008, &gpmc_cfg->sysconfig);
Tom> +#ifdef CONFIG_NOR
Tom> + writel(0x00000000, &gpmc_cfg->irqstatus);
Tom> + writel(0x00000000, &gpmc_cfg->irqenable);
Tom> + writel(0x00000A00, &gpmc_cfg->config);
Tom> +#else
Tom> writel(0x00000100, &gpmc_cfg->irqstatus);
Tom> writel(0x00000100, &gpmc_cfg->irqenable);
Tom> writel(0x00000012, &gpmc_cfg->config);
Tom> +#endif
So now you cannot E.G. have a single binary working on both the nand
flash of the evm and beaglebone? That's not really nice.
--
Bye, Peter Korsgaard
More information about the U-Boot
mailing list