Re: [U-Boot] [UBOOT][PATCH 3/5] configs: dra7-evm: Add mtd parts info for qspi.

2014-04-02 Thread Sourav Poddar

On Thursday 03 April 2014 11:59 AM, Jagan Teki wrote:

On Wed, Apr 2, 2014 at 4:06 PM, Sourav Poddar  wrote:

Add MTD partition info for qspi on dra7 evm

Signed-off-by: Sourav Poddar
---
  include/configs/dra7xx_evm.h |   46 ++
  1 file changed, 46 insertions(+)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 291c538..68496dc 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -75,6 +75,52 @@
  #define CONFIG_SF_DEFAULT_SPEED4800
  #define CONFIG_DEFAULT_SPI_MODESPI_MODE_3

+/*
+ * Default to using SPI for environment, etc.
+ * 0x00 - 0x01 : QSPI.SPL (64KiB)
+ * 0x01 - 0x02 : QSPI.SPL.backup1 (64KiB)
+ * 0x02 - 0x03 : QSPI.SPL.backup2 (64KiB)
+ * 0x03 - 0x04 : QSPI.SPL.backup3 (64KiB)
+ * 0x04 - 0x14 : QSPI.u-boot (1MiB)
+ * 0x14 - 0x15 : QSPI.u-boot-spl-os (64KiB)
+ * 0x15 - 0x16 : QSPI.u-boot-env (64KiB)
+ * 0x16 - 0x17 : QSPI.u-boot-env.backup1 (64KiB)
+ * 0x17 - 0x97 : QSPI.kernel (8MiB)
+ * 0x97 - 0x200 : USERLAND
+ */
+#if defined(CONFIG_QSPI_BOOT)
+#undef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#define CONFIG_ENV_SPI_MAX_HZ   CONFIG_SF_DEFAULT_SPEED
+#undef CONFIG_SPL_MAX_SIZE
+#define CONFIG_SPL_MAX_SIZE (64<<  10) /* 64 KiB */
+#define CONFIG_ENV_SECT_SIZE   (64<<  10) /* 64 KB sectors */
+#undef CONFIG_ENV_OFFSET
+#define CONFIG_ENV_OFFSET  0x15
+#undef CONFIG_ENV_OFFSET_REDUND
+#define CONFIG_ENV_OFFSET_REDUND   0x16
+
+#ifdef MTDIDS_DEFAULT
+#undef MTDIDS_DEFAULT
+#endif
+#define MTDIDS_DEFAULT "nor0=m25p80-flash.0"
+
+#ifdef MTDPARTS_DEFAULT
+#undef MTDPARTS_DEFAULT
+#endif
+#define MTDPARTS_DEFAULT   "mtdparts=qspi.0:64k(SPL)," \
+   "64k(QSPI.SPL.backup1)," \
+   "64k(QSPI.SPL.backup2)," \
+   "64k(QSPI.SPL.backup3)," \
+   "1m(QSPI.u-boot)," \
+   "64k(QSPI.u-boot-spl-os)," \
+   "64k(QSPI.u-boot-env)," \
+   "64k(QSPI.u-boot-env.backup1)," 
\
+   "8m(QSPI.kernel)," \
+   "-(QSPI.rootfs)"
+#endif
+
  /* SPI SPL */
  #define CONFIG_SPL_SPI_SUPPORT
  #define CONFIG_SPL_SPI_LOAD

Can you add log file for this qspi mtd tests on your next version patches.
Good to have this as we didn't mtd partitioning on qspi yet.

thanks!

Tom is planning to send the next version with few other cleanups.
Once, he does that, I will add a log file on top of that for my testing?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [UBOOT][PATCH 3/5] configs: dra7-evm: Add mtd parts info for qspi.

2014-04-02 Thread Jagan Teki
On Wed, Apr 2, 2014 at 4:06 PM, Sourav Poddar  wrote:
> Add MTD partition info for qspi on dra7 evm
>
> Signed-off-by: Sourav Poddar 
> ---
>  include/configs/dra7xx_evm.h |   46 
> ++
>  1 file changed, 46 insertions(+)
>
> diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
> index 291c538..68496dc 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -75,6 +75,52 @@
>  #define CONFIG_SF_DEFAULT_SPEED4800
>  #define CONFIG_DEFAULT_SPI_MODESPI_MODE_3
>
> +/*
> + * Default to using SPI for environment, etc.
> + * 0x00 - 0x01 : QSPI.SPL (64KiB)
> + * 0x01 - 0x02 : QSPI.SPL.backup1 (64KiB)
> + * 0x02 - 0x03 : QSPI.SPL.backup2 (64KiB)
> + * 0x03 - 0x04 : QSPI.SPL.backup3 (64KiB)
> + * 0x04 - 0x14 : QSPI.u-boot (1MiB)
> + * 0x14 - 0x15 : QSPI.u-boot-spl-os (64KiB)
> + * 0x15 - 0x16 : QSPI.u-boot-env (64KiB)
> + * 0x16 - 0x17 : QSPI.u-boot-env.backup1 (64KiB)
> + * 0x17 - 0x97 : QSPI.kernel (8MiB)
> + * 0x97 - 0x200 : USERLAND
> + */
> +#if defined(CONFIG_QSPI_BOOT)
> +#undef CONFIG_ENV_IS_IN_MMC
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
> +#define CONFIG_ENV_SPI_MAX_HZ   CONFIG_SF_DEFAULT_SPEED
> +#undef CONFIG_SPL_MAX_SIZE
> +#define CONFIG_SPL_MAX_SIZE (64 << 10) /* 64 KiB */
> +#define CONFIG_ENV_SECT_SIZE   (64 << 10) /* 64 KB sectors */
> +#undef CONFIG_ENV_OFFSET
> +#define CONFIG_ENV_OFFSET  0x15
> +#undef CONFIG_ENV_OFFSET_REDUND
> +#define CONFIG_ENV_OFFSET_REDUND   0x16
> +
> +#ifdef MTDIDS_DEFAULT
> +#undef MTDIDS_DEFAULT
> +#endif
> +#define MTDIDS_DEFAULT "nor0=m25p80-flash.0"
> +
> +#ifdef MTDPARTS_DEFAULT
> +#undef MTDPARTS_DEFAULT
> +#endif
> +#define MTDPARTS_DEFAULT   "mtdparts=qspi.0:64k(SPL)," \
> +   "64k(QSPI.SPL.backup1)," \
> +   "64k(QSPI.SPL.backup2)," \
> +   "64k(QSPI.SPL.backup3)," \
> +   "1m(QSPI.u-boot)," \
> +   "64k(QSPI.u-boot-spl-os)," \
> +   "64k(QSPI.u-boot-env)," \
> +   
> "64k(QSPI.u-boot-env.backup1)," \
> +   "8m(QSPI.kernel)," \
> +   "-(QSPI.rootfs)"
> +#endif
> +
>  /* SPI SPL */
>  #define CONFIG_SPL_SPI_SUPPORT
>  #define CONFIG_SPL_SPI_LOAD
Can you add log file for this qspi mtd tests on your next version patches.
Good to have this as we didn't mtd partitioning on qspi yet.

thanks!
-- 
Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [UBOOT][PATCH 3/5] configs: dra7-evm: Add mtd parts info for qspi.

2014-04-02 Thread Tom Rini
On Wed, Apr 02, 2014 at 04:06:11PM +0530, Sourav Poddar wrote:

> Add MTD partition info for qspi on dra7 evm
> 
> Signed-off-by: Sourav Poddar 
[snip]
> +/*
> + * Default to using SPI for environment, etc.
> + * 0x00 - 0x01 : QSPI.SPL (64KiB)
> + * 0x01 - 0x02 : QSPI.SPL.backup1 (64KiB)
> + * 0x02 - 0x03 : QSPI.SPL.backup2 (64KiB)
> + * 0x03 - 0x04 : QSPI.SPL.backup3 (64KiB)
> + * 0x04 - 0x14 : QSPI.u-boot (1MiB)
> + * 0x14 - 0x15 : QSPI.u-boot-spl-os (64KiB)

This is too small, I found out when adding falcon mode support for this
board.  We need to bump this to 512KiB and then re-adjust what follows.

> +#if defined(CONFIG_QSPI_BOOT)
> +#undef CONFIG_ENV_IS_IN_MMC

... This needs adjusting too, we should only be setting
CONFIG_ENV_IS_IN_MMC on !QSPI_BOOT, up in the MMC area.

And related, we need to fix ti_omap5_common.h to not set CONFIG_ENV_SIZE
because right now it's setting 128KiB and our redundant location never
would have valid data.

I'll pick this all up in a v2 and address it, along with a few other
things.  Thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [UBOOT][PATCH 3/5] configs: dra7-evm: Add mtd parts info for qspi.

2014-04-02 Thread Sourav Poddar
Add MTD partition info for qspi on dra7 evm

Signed-off-by: Sourav Poddar 
---
 include/configs/dra7xx_evm.h |   46 ++
 1 file changed, 46 insertions(+)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 291c538..68496dc 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -75,6 +75,52 @@
 #define CONFIG_SF_DEFAULT_SPEED4800
 #define CONFIG_DEFAULT_SPI_MODESPI_MODE_3
 
+/*
+ * Default to using SPI for environment, etc.
+ * 0x00 - 0x01 : QSPI.SPL (64KiB)
+ * 0x01 - 0x02 : QSPI.SPL.backup1 (64KiB)
+ * 0x02 - 0x03 : QSPI.SPL.backup2 (64KiB)
+ * 0x03 - 0x04 : QSPI.SPL.backup3 (64KiB)
+ * 0x04 - 0x14 : QSPI.u-boot (1MiB)
+ * 0x14 - 0x15 : QSPI.u-boot-spl-os (64KiB)
+ * 0x15 - 0x16 : QSPI.u-boot-env (64KiB)
+ * 0x16 - 0x17 : QSPI.u-boot-env.backup1 (64KiB)
+ * 0x17 - 0x97 : QSPI.kernel (8MiB)
+ * 0x97 - 0x200 : USERLAND
+ */
+#if defined(CONFIG_QSPI_BOOT)
+#undef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#define CONFIG_ENV_SPI_MAX_HZ   CONFIG_SF_DEFAULT_SPEED
+#undef CONFIG_SPL_MAX_SIZE
+#define CONFIG_SPL_MAX_SIZE (64 << 10) /* 64 KiB */
+#define CONFIG_ENV_SECT_SIZE   (64 << 10) /* 64 KB sectors */
+#undef CONFIG_ENV_OFFSET
+#define CONFIG_ENV_OFFSET  0x15
+#undef CONFIG_ENV_OFFSET_REDUND
+#define CONFIG_ENV_OFFSET_REDUND   0x16
+
+#ifdef MTDIDS_DEFAULT
+#undef MTDIDS_DEFAULT
+#endif
+#define MTDIDS_DEFAULT "nor0=m25p80-flash.0"
+
+#ifdef MTDPARTS_DEFAULT
+#undef MTDPARTS_DEFAULT
+#endif
+#define MTDPARTS_DEFAULT   "mtdparts=qspi.0:64k(SPL)," \
+   "64k(QSPI.SPL.backup1)," \
+   "64k(QSPI.SPL.backup2)," \
+   "64k(QSPI.SPL.backup3)," \
+   "1m(QSPI.u-boot)," \
+   "64k(QSPI.u-boot-spl-os)," \
+   "64k(QSPI.u-boot-env)," \
+   "64k(QSPI.u-boot-env.backup1)," 
\
+   "8m(QSPI.kernel)," \
+   "-(QSPI.rootfs)"
+#endif
+
 /* SPI SPL */
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot