[U-Boot] [PATCH] mx6: Add initial SPL support for HummingBoard-i2eX

Tom Rini trini at konsulko.com
Thu Apr 16 14:13:43 CEST 2015


On Wed, Apr 15, 2015 at 05:57:55PM -0300, Fabio Estevam wrote:

> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Add the initial SPL support for HummingBoard-i2eX, which is based on a
> MX6 Dual. 
> 
> For more information about HummingBoard, please check:
> http://www.solid-run.com/products/hummingboard/
> 
> Based on the work from Jon Nettleton and Rabeeh Khoury.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
[snip]
> +static void ccgr_init(void)
> +{
> +	struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
> +
> +	writel(0x00C03F3F, &ccm->CCGR0);
> +	writel(0x0030FC03, &ccm->CCGR1);
> +	writel(0x0FFFC000, &ccm->CCGR2);
> +	writel(0x3FF00000, &ccm->CCGR3);
> +	writel(0x00FFF300, &ccm->CCGR4);
> +	writel(0x0F0000C3, &ccm->CCGR5);
> +	writel(0x000003FF, &ccm->CCGR6);
> +}
> +
> +static void gpr_init(void)
> +{
> +	struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
> +
> +	/* enable AXI cache for VDOA/VPU/IPU */
> +	writel(0xF00000CF, &iomux->gpr[4]);
> +	/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
> +	writel(0x007F007F, &iomux->gpr[6]);
> +	writel(0x007F007F, &iomux->gpr[7]);
> +}

As a later clean-up maybe we should move these as default weak functions
to arch/arm/cpu/armv7/mx6/soc.c ?

> +void reset_cpu(ulong addr)
> +{
> +}

Not needed?

> +#endif
> diff --git a/configs/mx6cuboxi_spl_defconfig b/configs/mx6cuboxi_spl_defconfig
> new file mode 100644
> index 0000000..9847a9b
> --- /dev/null
> +++ b/configs/mx6cuboxi_spl_defconfig
> @@ -0,0 +1,6 @@
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"

Shouldn't need "SPL" listed here.

> +#define CONFIG_CMD_EXT2
> +#define CONFIG_CMD_EXT4

Don't need both.

> +/* Ethernet Configuration */
> +#define CONFIG_FEC_MXC
> +#ifdef CONFIG_FEC_MXC

Just define it?

> +	"fdt_high=0xffffffff\0"	  \
> +	"initrd_high=0xffffffff\0" \

No, we need to use bootm_size here instead.

> +#define CONFIG_ARP_TIMEOUT     200UL

Do we really need this?

> +#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "

Don't need.

> +#define CONFIG_SYS_MEMTEST_START       0x10000000
> +#define CONFIG_SYS_MEMTEST_END         0x10010000
> +#define CONFIG_SYS_MEMTEST_SCRATCH     0x10800000

Probably shouldn't set..

> +#define CONFIG_STACKSIZE               (128 * 1024)

Unused, iirc.

> +#define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
> +
> +#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM

Just use MMDC0_ARB_BASE_ADDR directly.

> +/* FLASH and environment organization */
> +#define CONFIG_SYS_NO_FLASH
> +#define CONFIG_ENV_SIZE			(8 * 1024)
> +#define CONFIG_ENV_IS_IN_MMC
> +
> +#if defined(CONFIG_ENV_IS_IN_MMC)
> +#define CONFIG_ENV_OFFSET		(8 * 64 * 1024)
> +#endif

Just define things, don't test.

> +#define CONFIG_DEFAULT_FDT_FILE	"imx6q-hummingboard.dtb"

Group this with the rest of the env parts?

> +#define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)

Unused.

> +#if defined(CONFIG_ENV_IS_IN_MMC)
> +#define CONFIG_SYS_MMC_ENV_DEV		0	/* SDHC2 */
> +#endif

Again, just define, and group with the others.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150416/2f8de0de/attachment.sig>


More information about the U-Boot mailing list