All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] am335x_evm:Add support for the NOR module on the memory cape
Date: Mon, 13 May 2013 09:31:05 -0400	[thread overview]
Message-ID: <5190EB19.8020301@ti.com> (raw)
In-Reply-To: <87k3n3vqto.fsf@dell.be.48ers.dk>

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

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

Whoops.

> Tom> From: Steve Kipisz <s-kipisz2@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@ti.com> Tom> [trini: 
> Clean up config changes slightly] Tom> Signed-off-by: Tom Rini 
> <trini@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-----

  reply	other threads:[~2013-05-13 13:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 22:45 [U-Boot] [PATCH 1/6] am335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE Tom Rini
2013-05-08 22:45 ` [U-Boot] [PATCH 2/6] am335x_evm: Add MTDPARTS info for SPI flash Tom Rini
2013-05-12 21:10   ` Peter Korsgaard
2013-05-13 12:24     ` Tom Rini
2013-05-13 16:10       ` Tom Rini
2013-05-08 22:45 ` [U-Boot] [PATCH 3/6] am335x_evm: Only set CONFIG_NAND when !CONFIG_SPI_BOOT Tom Rini
2013-05-12 21:08   ` Peter Korsgaard
2013-05-13 12:21     ` Tom Rini
2013-05-08 22:45 ` [U-Boot] [PATCH 4/6] am335x_evm: Rework board_is_foo() checks Tom Rini
2013-05-08 22:45 ` [U-Boot] [PATCH 5/6] am335x_evm:Add support for the NOR module on the memory cape Tom Rini
2013-05-12 21:19   ` Peter Korsgaard
2013-05-13 13:31     ` Tom Rini [this message]
2013-05-08 22:45 ` [U-Boot] [PATCH 6/6] am335x_evm: Add support to boot from NOR Tom Rini
2013-05-12 21:34   ` Peter Korsgaard
2013-05-12 21:42     ` Tom Rini
2013-05-12 21:53       ` Peter Korsgaard
2013-05-13 13:35         ` Tom Rini
2013-05-12 20:54 ` [U-Boot] [PATCH 1/6] am335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE Peter Korsgaard

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=5190EB19.8020301@ti.com \
    --to=trini@ti.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.