[U-Boot] [PATCH 5/6] am335x_evm:Add support for the NOR module on the memory cape

Tom Rini trini at ti.com
Mon May 13 15:31:05 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/12/2013 05:19 PM, Peter Korsgaard wrote:
>>>>>> "Tom" == Tom Rini <trini at ti.com> writes:
> 
> Space missing after ':' in subject.

Whoops.

> 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.

The GPMC setup stuff has historically been, lets say less than
optimal.  We might be able to move this to board_init like omap3 does,
however.  I'll check.

> 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.

It's worse than that.  We don't have a NOR cape, we have a memory cape
and NOR module.  We could have a memory cape and NAND module.  And
there's not a nice way at run-time to determine if we've got one or
the other.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRkOsZAAoJENk4IS6UOR1W78MP/A3P2BPDlERB7wV14xwRt8iN
k9cIQnQLbcv9BgyS0RRmGA9laR/AUMbtquGrH0NWV/LHjwYlrihxrGfngzqHFh/G
SQewGi2Sy/ZnMWGcZ2laST+lgupoQC8BgO6atuhBn6wQuSfPY0RT+YzV6NxfwP9H
fPt/lemW65M9ukevJ0dxNaVmv3ivtyGXsNKWJ5/p/CptFxrq+pi7VoYlmvhNVvf2
lDN+6G88lc6Uz5Gx+FdijgtQVyac+7kBB2z9RRJmWo+eo3iGTQ58cBXQshKzjN1q
cPAhMN6VSH6cbyzSjTNP5r1rLQBggyGZmAg2X22Yf7r3w6icOeUSYgSaOl1h1yKB
K5NAM4bMsiQz+DnpiGq3DCtmf2EhdBYxbAE18MMUBbvQsg5lKGzpDgvA3pkcA1Hv
ULEr71F6PcPLaxlv8uVLRyqGWYNzULuPGAioBC5nYFzj3PIFzD+ycVe72uYm2Z2l
7/SmfYwj1CQN49OKeJCulYxpfhaCt+fpA6w7FLvhR/XqT03JAhnO8+5htaNL3scd
v4agai/zB10fgqHjoe3COo6PvGry8g+llYWG9V7XmHYIOFhdkdGbtiJVsd7v6Oq6
ku42S0SD4vcVUS2DJMyLnXrDq/LDOg7wm3BHPM97Kf4F4WA7k9Mt0Z4qn19PCsvn
lRgk48QuAQuNjj+/C9fF
=6YBK
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list