[U-Boot] [PATCH 08/12] MX6: add mmdc configuration for MX6Q/MX6DL

Tim Harvey tharvey at gateworks.com
Tue Apr 29 20:19:01 CEST 2014


On Tue, Apr 29, 2014 at 8:15 AM, Eric Nelson
<eric.nelson at boundarydevices.com> wrote:
> 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.
>

Eric,

Yes - that makes sense. Someone could have a single CPU but have
several memory variants. I'm not sure how much codespace it will save
but things are tight at 64KB max.

I can wrap the functions and their calls with an:

#if defined(MX6QDL) || defined(MX6Q) || defined(MX6D)

>
>> +/* 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:
>

and:

#if defined(MX6QDL) || defined(MX6DL) || defined(MX6S)

Tim

>
>> +/* 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