[U-Boot] [PATCH 08/12] MX6: add mmdc configuration for MX6Q/MX6DL
Eric Nelson
eric.nelson at boundarydevices.com
Tue Apr 29 17:15:33 CEST 2014
Hi Tim,
On 04/28/2014 01:17 PM, Tim Harvey wrote:
> Add functions for configuring MMDC iomux and configuration based on
> board-specific configurations.
>
> Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> ---
> v2:
> - split out mmdc and iomux structs into separate patch
> ---
> arch/arm/cpu/armv7/mx6/Makefile | 1 +
> arch/arm/cpu/armv7/mx6/ddr.c | 469 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 470 insertions(+)
> create mode 100644 arch/arm/cpu/armv7/mx6/ddr.c
>
> diff --git a/arch/arm/cpu/armv7/mx6/Makefile b/arch/arm/cpu/armv7/mx6/Makefile
> index d7285fc..6dc9f8e 100644
> --- a/arch/arm/cpu/armv7/mx6/Makefile
> +++ b/arch/arm/cpu/armv7/mx6/Makefile
> @@ -8,4 +8,5 @@
> #
>
> obj-y := soc.o clock.o
> +obj-$(CONFIG_SPL_BUILD) += ddr.o
> obj-$(CONFIG_SECURE_BOOT) += hab.o
> diff --git a/arch/arm/cpu/armv7/mx6/ddr.c b/arch/arm/cpu/armv7/mx6/ddr.c
> new file mode 100644
> index 0000000..1536418
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/mx6/ddr.c
> @@ -0,0 +1,469 @@
> +/*
> + * Copyright (C) 2014 Gateworks Corporation
> + * Author: Tim Harvey <tharvey at gateworks.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <linux/types.h>
> +#include <asm/arch/mx6-ddr.h>
> +#include <asm/arch/sys_proto.h>
> +#include <asm/io.h>
> +#include <asm/types.h>
> +
Do you think that someone will want to use SPL on i.MX6 with
support for only one of the variants?
It seems that this should be conditionally included if
i.MX6DQ is supported by the board.
> +/* Configure MX6DQ mmdc iomux */
> +void mx6dq_dram_iocfg(unsigned width,
> + const struct mx6dq_iomux_ddr_regs *ddr,
> + const struct mx6dq_iomux_grp_regs *grp)
> +{
> + volatile struct mx6dq_iomux_ddr_regs *mx6_ddr_iomux;
>
...
Ditto for i.MX6SDL:
> +/* Configure MX6SDL mmdc iomux */
> +void mx6sdl_dram_iocfg(unsigned width,
> + const struct mx6sdl_iomux_ddr_regs *ddr,
> + const struct mx6sdl_iomux_grp_regs *grp)
> +{
Regards,
Eric
More information about the U-Boot
mailing list