From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Spinrath Date: Sat, 25 Jun 2016 17:05:14 +0200 Subject: [U-Boot] [PATCH 3/3] ARM: configs: cm_fx6: add mtd support In-Reply-To: <74b93a24448a4d4e93d5f1a2c28b1580@rwthex-w1-a.rwth-ad.de> References: <20160619154456.29027-1-christopher.spinrath@rwth-aachen.de> <795d43d2bdc64a5d84abadcdbe528fdb@rwthex-w2-b.rwth-ad.de> <8d32fabc-be76-282b-9cfd-35bdc076c174@rwth-aachen.de> <74b93a24448a4d4e93d5f1a2c28b1580@rwthex-w1-a.rwth-ad.de> Message-ID: <8bc0b46100f04926a8a5567cc64b1b50@rwthex-s1-b.rwth-ad.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Igor, On 06/23/2016 11:03 AM, Igor Grinberg wrote: > On 06/22/2016 10:27 PM, Christopher Spinrath wrote: >> Hi Igor, >> >> On 06/22/2016 06:15 PM, Igor Grinberg wrote: >>> On 06/19/2016 06:44 PM, Christopher Spinrath wrote: >>>> 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. >>>> >>>> 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 >>>> --- >>>> 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 >>> >>> [...] >>> >>>> @@ -157,7 +174,7 @@ >>>> "run setupnandboot;" \ >>>> "run nandboot;" >>>> >>>> -#define CONFIG_PREBOOT "usb start" >>>> +#define CONFIG_PREBOOT "usb start;sf probe" >>> >>> Probably, this is really needed. >>> Care to explain? >>> >> The sf probe command probes for the spi flash and registers (on success) >> the device as nor0. This device is used by mtdparts (cf. the mtdids >> variable; it maps the U-Boot name nor0 to the kernel name spi0.0) and >> the mtd fixup code in patch 2 (cf. the nodes array; it specifies the >> compatible of the flash chip of type NOR #0, i.e. nor0). >> >> Without this all mtdparts commands will fail and the fixup code won't >> work because there is nor0 device. > > Thanks for the explanation! > That sounds to me like this should go away once we have the DM in place > for spi flash and MTD (added Simon to Cc). > Meanwhile, may be a short notice in the commit message? > Sure, I will add it. Thanks, Christopher