From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Don't fixup NOR flash node size on Ebony
Date: Wed, 15 Sep 2010 15:14:03 +0200 [thread overview]
Message-ID: <20100915131403.DA0D0135155@gemini.denx.de> (raw)
In-Reply-To: <1284555484-27269-1-git-send-email-sr@denx.de>
Dear Stefan Roese,
In message <1284555484-27269-1-git-send-email-sr@denx.de> you wrote:
> Don't update size in "reg" property of NOR FLASH device tree nodes.
> This leads to a problem with this NOR flash setup, where
> chip-select 0 is connected to 512KiB SRAM *and* 512KiB NOR flash.
> And with this fixup-code, the size of the NOR flash node is changed
> from 512KiB to 1MiB which leads to a crash in the Linux MTD driver.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Detlev Zundel <dzu@denx.de>
> ---
> include/configs/ebony.h | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/include/configs/ebony.h b/include/configs/ebony.h
> index 10f425d..eb58240 100644
> --- a/include/configs/ebony.h
> +++ b/include/configs/ebony.h
> @@ -117,6 +117,14 @@
> #define CONFIG_SYS_FLASH_ADDR0 0x5555
> #define CONFIG_SYS_FLASH_ADDR1 0x2aaa
> #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
> +/*
> + * Don't update size in "reg" property of NOR FLASH device tree nodes.
> + * This leads to a problem with this NOR flash setup, where
> + * chip-select 0 is connected to 512KiB SRAM *and* 512KiB NOR flash.
> + * And with this fixup-code, the size of the NOR flash node is changed
> + * from 512KiB to 1MiB which leads to a crash in the Linux MTD driver.
> + */
> +#undef CONFIG_FDT_FIXUP_NOR_FLASH_SIZE
Sorry, but NAK.
Even if connected to the same chip select, NOR flash and SRAM are
different devices, which are described by different properties in the
device tree and which have separate addresses and sizes.
The "reg" property of NOR FLASH device tree nodes *should* be updated
with the correct size of the NOR flash as determined by the CFI
driver; on this board, this should be 512 KiB.
Both the bd_info command and the device tree should report a NOR flash
size of 512 KiB.
The SRAM size is completely independent of that. As we don't provide
auto-sizing for the sram, the board config file should contain (read:
needs to get fixed to contain) the correct CONFIG_SYS_SRAM_BASE and
CONFIG_SYS_SRAM_SIZE settings (with CONFIG_SYS_SRAM_SIZE = 512 KiB).
Both the bd_info command and the device tree should report a SRAM size
of 512 KiB.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
next prev parent reply other threads:[~2010-09-15 13:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 12:58 [U-Boot] [PATCH] ppc4xx: Don't fixup NOR flash node size on Ebony Stefan Roese
2010-09-15 13:14 ` Wolfgang Denk [this message]
2010-09-15 13:43 ` Stefan Roese
2010-09-15 13:57 ` Wolfgang Denk
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=20100915131403.DA0D0135155@gemini.denx.de \
--to=wd@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox