From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2 v3] arm: suen3, suen3_v1, mgcoge2_arm_p1a support
Date: Wed, 3 Feb 2010 16:32:17 -0600 [thread overview]
Message-ID: <20100203223217.GA9158@loki.buserror.net> (raw)
In-Reply-To: <4B699BA5.6090001@denx.de>
On Wed, Feb 03, 2010 at 04:52:05PM +0100, Heiko Schocher wrote:
> >> + if ((strcmp(argv[1], "off") == 0)) {
> >> + printf("SPI FLASH disabled, NAND enabled\n");
> >> + /* Multi-Purpose Pins Functionality configuration */
> >> + kwmpp_config[0] = MPP0_NF_IO2;
> >> + kwmpp_config[1] = MPP1_NF_IO3;
> >> + kwmpp_config[2] = MPP2_NF_IO4;
> >> + kwmpp_config[3] = MPP3_NF_IO5;
> >> +
> >> + kirkwood_mpp_conf(kwmpp_config);
> >> + tmp = readl(KW_GPIO0_BASE);
> >> + writel(tmp | FLASH_GPIO_PIN , KW_GPIO0_BASE);
> >> +
> >> + nand_init();
> >> + } else if ((strcmp(argv[1], "on") == 0)) {
> >> + printf("SPI FLASH enabled, NAND disabled\n");
> >> + /* Multi-Purpose Pins Functionality configuration */
> >> + kwmpp_config[0] = MPP0_SPI_SCn;
> >> + kwmpp_config[1] = MPP1_SPI_MOSI;
> >> + kwmpp_config[2] = MPP2_SPI_SCK;
> >> + kwmpp_config[3] = MPP3_SPI_MISO;
> >> +
> >> + kirkwood_mpp_conf(kwmpp_config);
> >> + tmp = readl(KW_GPIO0_BASE);
> >> + writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE);
> >> +
> >> + nand_init();
> >
> > What do you need nand_init for disabled nand operation?
>
> With it, the nand subsystem knows, that there is no longer
> the nand availiable.
That's not how nand_init() is meant to be used. It is meant to be called
once on system init. There is probably at least a memory leak here, e.g.
chip->buffers.
Even as a hack, it looks like these boards use the kirkwood nand controller,
and its board_nand_init() will unconditionally return 0, telling
nand_init_chip that it does indeed have NAND available. Or is there a patch
somewhere changing that?
-Scott
next prev parent reply other threads:[~2010-02-03 22:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 7:56 [U-Boot] arm: suen3, suen3_v1, mgcoge2_arm_p1a support Heiko Schocher
2010-01-17 23:51 ` Wolfgang Denk
2010-01-18 8:34 ` Heiko Schocher
2010-01-18 9:31 ` Stefan Roese
2010-01-27 7:23 ` Heiko Schocher
2010-01-27 7:30 ` [U-Boot] [PATCH 1/2 v2] cramfs: make cramfs usable on non NOR flash Heiko Schocher
2010-01-27 19:28 ` Wolfgang Denk
2010-01-28 7:30 ` Heiko Schocher
2010-01-28 10:15 ` Wolfgang Denk
2010-01-28 11:02 ` Heiko Schocher
2010-01-27 7:31 ` [U-Boot] [PATCH 2/2 v2] arm: suen3, suen3_v1, mgcoge2_arm_p1a support Heiko Schocher
2010-01-27 13:50 ` Tom
2010-01-27 14:43 ` Heiko Schocher
2010-01-28 13:54 ` Tom
2010-01-27 19:49 ` Wolfgang Denk
2010-02-01 7:37 ` [U-Boot] [PATCH 2/2 v3] " Heiko Schocher
2010-02-02 18:07 ` Prafulla Wadaskar
2010-02-03 6:42 ` Wolfgang Denk
2010-02-03 15:52 ` Heiko Schocher
2010-02-03 16:53 ` Stefan Roese
2010-02-03 22:32 ` Scott Wood [this message]
2010-02-04 7:24 ` Heiko Schocher
2010-02-08 19:23 ` Scott Wood
2010-02-10 7:09 ` Heiko Schocher
2010-02-10 7:41 ` Prafulla Wadaskar
2010-02-10 9:27 ` Heiko Schocher
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=20100203223217.GA9158@loki.buserror.net \
--to=scottwood@freescale.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.