From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/4] ARM: configs: cm_fx6: add mtd support
Date: Wed, 13 Jul 2016 12:53:09 +0200 [thread overview]
Message-ID: <57861D95.60903@denx.de> (raw)
In-Reply-To: <56eb9245d4344b6dbac260fa6335eeb7@rwthex-s1-b.rwth-ad.de>
On 12/07/2016 23:37, christopher.spinrath at rwth-aachen.de wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>
> The cm-fx6 module has an on-board spi flash chip. Enable mtd support
> and the mtdparts command. Also define a default partitioning, add
> it to the default environment, and enable support to overwrite the
> partitioning defined in a device tree by it. Finally, probe for the
> chip on preboot to register the flash chip and, thus, establish the
> connection between the mtd environment settings and the actual device.
>
> These changes move the effective default partitioning from the device
> tree shipped with the vendor kernels to U-Boot which becomes the single
> point of definition for the partitioning for all device tree based
> kernels (in particular, for the upstream Linux kernel which does not
> have a default partitioning defined in its device tree).
>
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> ---
>
> Notes:
> Changes since v1:
> - explain the "sf probe" command added to preboot in the commit message
>
> include/configs/cm_fx6.h | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
> index f054ca8..c839b03 100644
> --- a/include/configs/cm_fx6.h
> +++ b/include/configs/cm_fx6.h
> @@ -18,6 +18,7 @@
> #define CONFIG_MACH_TYPE 4273
>
> /* CMD */
> +#define CONFIG_CMD_MTDPARTS
>
> /* MMC */
> #define CONFIG_SYS_FSL_USDHC_NUM 3
> @@ -53,6 +54,20 @@
> #define CONFIG_SF_DEFAULT_SPEED 25000000
> #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
>
> +/* MTD support */
> +#ifndef CONFIG_SPL_BUILD
> +#define CONFIG_FDT_FIXUP_PARTITIONS
> +#define CONFIG_MTD_DEVICE
> +#define CONFIG_MTD_PARTITIONS
> +#define CONFIG_SPI_FLASH_MTD
> +#endif
> +
> +#define MTDIDS_DEFAULT "nor0=spi0.0"
> +#define MTDPARTS_DEFAULT "mtdparts=spi0.0:" \
> + "768k(uboot)," \
> + "256k(uboot-environment)," \
> + "-(reserved)"
> +
> /* Environment */
> #define CONFIG_ENV_IS_IN_SPI_FLASH
> #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
> @@ -83,6 +98,8 @@
> "video_dvi=mxcfb0:dev=dvi,1280x800M-32 at 50,if=RGB32\0" \
> "doboot=bootm ${loadaddr}\0" \
> "doloadfdt=false\0" \
> + "mtdids=" MTDIDS_DEFAULT "\0" \
> + "mtdparts=" MTDPARTS_DEFAULT "\0" \
> "setboottypez=setenv kernel ${zImage};" \
> "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
> "setenv doloadfdt true;\0" \
> @@ -157,7 +174,7 @@
> "run setupnandboot;" \
> "run nandboot;"
>
> -#define CONFIG_PREBOOT "usb start"
> +#define CONFIG_PREBOOT "usb start;sf probe"
>
> /* SPI */
> #define CONFIG_SPI
>
I put these on my queue list to be apply - I wait just for Nikita's ACK
as board's maintainer.
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2016-07-13 10:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160712213737.2303-1-christopher.spinrath@rwth-aachen.de>
2016-07-12 21:37 ` [U-Boot] [PATCH v2 1/4] ARM: configs: cm_fx6: improve default environment christopher.spinrath at rwth-aachen.de
2016-07-12 21:37 ` [U-Boot] [PATCH v2 2/4] fdt_support: define stub for fdt_fixup_mtdparts christopher.spinrath at rwth-aachen.de
2016-07-12 21:57 ` Simon Glass
2016-07-14 8:16 ` Igor Grinberg
2016-07-12 21:37 ` [U-Boot] [PATCH v2 3/4] ARM: board: cm_fx6: fixup mtd partitions in the fdt christopher.spinrath at rwth-aachen.de
2016-07-14 8:20 ` Igor Grinberg
2016-07-12 21:37 ` [U-Boot] [PATCH v2 4/4] ARM: configs: cm_fx6: add mtd support christopher.spinrath at rwth-aachen.de
2016-07-13 10:53 ` Stefano Babic [this message]
2016-07-14 8:23 ` Igor Grinberg
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=57861D95.60903@denx.de \
--to=sbabic@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 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.