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 v2 6/7] am335x_evm: Add support for the NOR module on the memory cape
Date: Thu, 16 May 2013 10:46:41 -0400	[thread overview]
Message-ID: <20130516144641.GH32163@bill-the-cat> (raw)
In-Reply-To: <8738tnngf9.fsf@dell.be.48ers.dk>

On Thu, May 16, 2013 at 04:32:58PM +0200, Peter Korsgaard wrote:
> >>>>> "Tom" == Tom Rini <trini@ti.com> writes:
> 
>  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.
[snip]
>  Tom> @@ -77,9 +77,15 @@ void gpmc_init(void)
>  
>  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
> 
> This looks to me as an indication that irqstatus/irqenable/config should
> really be arguments of gpmc_init().

Perhaps.  I've still got an open poke about what's going on, exactly
here.

[snip]
>  Tom> +/* NOR chip on NOR module for Beaglebone */
>  Tom> +#define STNOR_GPMC_CONFIG1	0x00001200
>  Tom> +#define STNOR_GPMC_CONFIG2	0x00101000
>  Tom> +#define STNOR_GPMC_CONFIG3	0x00030301
>  Tom> +#define STNOR_GPMC_CONFIG4	0x10041004
>  Tom> +#define STNOR_GPMC_CONFIG5	0x000C1010
>  Tom> +#define STNOR_GPMC_CONFIG6	0x08070280
>  Tom> +#define STNOR_GPMC_CONFIG7	0x00000F48
> 
> Why are these not in board/ti/am335x/board.{c,h} if they are beaglebone
> specific?

The timings would be valid to anyone using the same NOR on a custom
chip.  I'll re-word the comment.

>  Tom> +#ifdef CONFIG_NOR
>  Tom> +	/* Reconfigure CS0 for NOR instead of NAND. */
>  Tom> +	enable_gpmc_cs_config(gpmc_nor, &gpmc_cfg->cs[0],
>  Tom> +			      CONFIG_SYS_FLASH_BASE, GPMC_SIZE_16M);
>  Tom> +#endif
>  Tom> +
> 
> Perhaps the nand handling should just get moved out of gpmc_init() (or
> the _cs_config args should be passed to gpmc_init() ).

I looked at this, on the scale of redoing omap3 too (where we have a lot
of existing examples).  The split we've got now works and it's harmless
to re-configure CS0 in the case where the defaults don't work.  I think
this would lead us to an abstraction that leads to a lot of board files
duplicating the same code.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130516/19ab589d/attachment.pgp>

  reply	other threads:[~2013-05-16 14:46 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 18:28 [U-Boot] [PATCH v2 1/7] am33xx/omap3: Clean up gpmc_init slightly Tom Rini
2013-05-13 18:28 ` [U-Boot] [PATCH v2 2/7] am335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE Tom Rini
2013-05-13 18:28 ` [U-Boot] [PATCH v2 3/7] am335x_evm: Update SPI_BOOT support, add MTDPARTS info Tom Rini
2013-05-15 20:41   ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 4/7] am335x_evm: Only set CONFIG_NAND when !CONFIG_SPI_BOOT Tom Rini
2013-05-15 20:42   ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 5/7] am335x_evm: Rework board_is_foo() checks Tom Rini
2013-05-15 20:43   ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 6/7] am335x_evm: Add support for the NOR module on the memory cape Tom Rini
2013-05-16 14:32   ` Peter Korsgaard
2013-05-16 14:46     ` Tom Rini [this message]
2013-05-16 18:54       ` Peter Korsgaard
2013-05-16 19:27         ` Tom Rini
2013-05-16 19:32           ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 7/7] am335x_evm: Add support to boot from NOR Tom Rini
2013-05-16 14:36   ` Peter Korsgaard
2013-05-16 14:49     ` Tom Rini
2013-05-16 18:55       ` Peter Korsgaard
2013-05-16 19:30         ` Tom Rini
2013-05-16 19:32           ` Peter Korsgaard
2013-06-17 14:43   ` Mark Jackson
2013-06-17 14:49     ` Tom Rini
2013-06-17 14:59       ` Mark Jackson
2013-06-17 15:01         ` Tom Rini
2013-06-17 15:23           ` Mark Jackson
2013-06-17 15:23         ` Mark Jackson
2013-06-17 15:29           ` Tom Rini
2013-06-17 16:01           ` Stefan Roese
2013-06-17 16:10             ` Mark Jackson
2013-06-17 17:04               ` Kipisz, Steven
2013-06-17 18:38                 ` Mark Jackson
2013-06-18 12:11     ` Mark Jackson
2013-07-11 13:06       ` Mark Jackson
2013-07-11 13:28         ` Tom Rini
2013-07-11 13:45           ` Mark Jackson
2013-07-11 14:34             ` Albert ARIBAUD
2013-07-11 15:54               ` Tom Rini
2013-07-11 16:08                 ` Albert ARIBAUD
2013-07-11 16:14                   ` Albert ARIBAUD
2013-07-11 16:17                     ` Tom Rini
2013-07-17 12:58         ` Mark Jackson
2013-07-17 13:32           ` Tom Rini
2013-05-15 20:39 ` [U-Boot] [PATCH v2 1/7] am33xx/omap3: Clean up gpmc_init slightly 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=20130516144641.GH32163@bill-the-cat \
    --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.