From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 2/6] dm: sunxi: Add a new config for an FDT-based pcDuino3
Date: Wed, 29 Oct 2014 10:32:15 +0100 [thread overview]
Message-ID: <5450B41F.4010302@redhat.com> (raw)
In-Reply-To: <CAPnjgZ31cAW13CxKCBjyUOYixTPzcsrgX=Nfc+Ew3v7mn=BEJA@mail.gmail.com>
Hi,
On 10/29/2014 04:02 AM, Simon Glass wrote:
> Hi Hans,
>
> On 28 October 2014 03:13, Hans de Goede <hdegoede@redhat.com> wrote:
>> Hi,
>>
>> On 10/28/2014 01:04 AM, Simon Glass wrote:
>>> Hi Hans,
>>>
>>> On 24 October 2014 02:38, Hans de Goede <hdegoede@redhat.com> wrote:
>>>> Hi,
>>>>
>>>> On 10/23/2014 06:02 AM, Simon Glass wrote:
>>>>> For now we won't want to mess with the existing configurations. Create a
>>>>> new one which will enable device tree and driver model. Note that this
>>>>> brings the device tree binary into u-boot-sunxi-with-spl.bin.
>>>>>
>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>>> ---
>>>>>
>>>>> Changes in v2: None
>>>>>
>>>>> Makefile | 3 ++-
>>>>> arch/arm/dts/Makefile | 1 +
>>>>> board/sunxi/MAINTAINERS | 1 +
>>>>> configs/Linksprite_pcDuino3_fdt_defconfig | 8 ++++++++
>>>>> include/configs/sun7i.h | 4 ++++
>>>>> 5 files changed, 16 insertions(+), 1 deletion(-)
>>>>> create mode 100644 configs/Linksprite_pcDuino3_fdt_defconfig
>>>>>
>>>>> diff --git a/Makefile b/Makefile
>>>>> index 99097e1..816f859 100644
>>>>> --- a/Makefile
>>>>> +++ b/Makefile
>>>>> @@ -941,7 +941,8 @@ u-boot-nand.gph: u-boot.bin FORCE
>>>>> ifneq ($(CONFIG_SUNXI),)
>>>>> OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
>>>>> --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
>>>>> -u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE
>>>>> +u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \
>>>>> + u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE
>>>>> $(call if_changed,pad_cat)
>>>>> endif
>>>>>
>>>>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>>>>> index 3299817..564eb76 100644
>>>>> --- a/arch/arm/dts/Makefile
>>>>> +++ b/arch/arm/dts/Makefile
>>>>> @@ -1,3 +1,4 @@
>>>>> +dtb-$(CONFIG_SUN7I) += sun7i-a20-pcduino3.dtb
>>>>
>>>> Please make this
>>>>
>>>> dtb-$(CONFIG_PCDUINO3) += sun7i-a20-pcduino3.dtb
>>>
>>> Well I can do that, but this should have no effect if we don't define
>>> CONFIG_OF_CONTROL. The way I have it we will be able to add more
>>> device tree files for sun7x without anyone having to change it. The
>>> target should build all sun7i device trees eventually.
>>
>> Ah, I see, ok lets keep this as is then.
>>
>>>
>>>>
>>>>> dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
>>>>> dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
>>>>> dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
>>>>> diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
>>>>> index 4f32195..3dbfe15 100644
>>>>> --- a/board/sunxi/MAINTAINERS
>>>>> +++ b/board/sunxi/MAINTAINERS
>>>>> @@ -21,6 +21,7 @@ F: configs/A20-OLinuXino_MICRO_defconfig
>>>>> F: configs/Bananapi_defconfig
>>>>> F: configs/i12-tvbox_defconfig
>>>>> F: configs/Linksprite_pcDuino3_defconfig
>>>>> +F: configs/Linksprite_pcDuino3_fdt_defconfig
>>>>> F: configs/qt840a_defconfig
>>>>>
>>>>> CUBIEBOARD2 BOARD
>>>>> diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig b/configs/Linksprite_pcDuino3_fdt_defconfig
>>>>> new file mode 100644
>>>>> index 0000000..e5f6236
>>>>> --- /dev/null
>>>>> +++ b/configs/Linksprite_pcDuino3_fdt_defconfig
>>>>> @@ -0,0 +1,8 @@
>>>>> +CONFIG_SPL=y
>>>>> +CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI,DM"
>>>>> +CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
>>>>> +CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
>>>>
>>>> Hmm, I don't like this doubling of info. CONFIG_FDTFILE is sort of a sunxi specific thing
>>>> here (some other boards have local usage of its too, but it is not used globably.
>>>>
>>>> Can you do a patch (and prepend it to this one in the next posting of this series),
>>>> which replaces sunxi's CONFIG_FDTFILE usage with CONFIG_DEFAULT_DEVICE_TREE, dropping
>>>> the .dtb appending in the defconfigs and instead append the .dtb in include/configs/sunxi-commom.h
>>>>
>>>> Note sunxi uses CONFIG_FDTFILE in 3 places:
>>>>
>>>> 1) board/sunxi/Kconfig
>>>> 2) various board/*_defconfig files
>>>> 3) include/configs/sunxi-common.h
>>>
>>> But isn't that used for passing to the kernel? Do you want to drop the
>>> ability to have a separate file for each?
>>
>> A good question, there are 2 things here:
>>
>> 1) This is just the filename, it gets combined with a "basedir" set through extlinux.conf
>> when booting the real kernel, so they can still be different
>>
>> 2) TBH even if this would make it mandatory for them to be 1 and the same file, I would
>> not consider that a problem, I would very much like to avoid the need to have separate
>> u-boot and kernel devicetree flavors for sunxi.
>
> OK fair enough, but actually I feel that this should be unrelated to
> my change. The CONFIG_DEFAULT_DEVICE_TREE setting is used by all
> boards that use device tree. It seems that CONFIG_FDTFILE is used in a
> few places but is not very widespread.
>
> So I suppose what I am saying is, how about you do the patch you are
> talking about? I need to be careful to focus on drivel model changes
> and not boil the ocearn, or I will never get done!
Ok, I lets leave this bit of the patch as is then, and I'll put fixing this
on my todo list.
So...
>
>>
>>
>>>
>>>>
>>>>
>>>>> +CONFIG_OF_CONTROL=y
>>>>> +CONFIG_OF_SEPARATE=y
>>>>> ++S:CONFIG_ARM=y
>>>>> ++S:CONFIG_TARGET_SUN7I=y
>>>>> diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
>>>>> index a902b84..500d0e3 100644
>>>>> --- a/include/configs/sun7i.h
>>>>> +++ b/include/configs/sun7i.h
>>>>> @@ -36,6 +36,10 @@
>>>>> #define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE
>>>>> #define CONFIG_SYS_CLK_FREQ 24000000
>>>>>
>>>>> +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
>>>>> +# define CONFIG_CMD_DM
>>>>> +#endif
>>>>> +
>>>>
>>>> Can you please put this in include/configs/sunxi-common.h instead ?
>>>
>>> OK will do.
If you can do a respin based on tip of the latest master and with this one
small item fixed, then I'll queue up your patches in u-boot-sunxi/next
Thanks & Regards,
Hans
next prev parent reply other threads:[~2014-10-29 9:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 4:02 [U-Boot] [PATCH v2 0/6] dm: Introduce driver model for sunxi Simon Glass
2014-10-23 4:02 ` [U-Boot] [PATCH v2 1/6] dm: sunxi: dts: Add sun7i device tree files Simon Glass
2014-10-24 8:32 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28 1:05 ` Simon Glass
2014-10-23 4:02 ` [U-Boot] [PATCH v2 2/6] dm: sunxi: Add a new config for an FDT-based pcDuino3 Simon Glass
2014-10-24 8:38 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28 0:04 ` Simon Glass
2014-10-28 9:13 ` Hans de Goede
2014-10-29 3:02 ` Simon Glass
2014-10-29 9:32 ` Hans de Goede [this message]
2014-10-29 19:30 ` Simon Glass
2014-10-30 8:36 ` Hans de Goede
2014-10-23 4:02 ` [U-Boot] [PATCH v2 3/6] dm: sunxi: Add pinmux functions which take a bank parameter Simon Glass
2014-10-24 9:00 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-23 4:02 ` [U-Boot] [PATCH v2 4/6] dm: sunxi: Make sure that GPIOs are requested Simon Glass
2014-10-24 9:01 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-23 4:02 ` [U-Boot] [PATCH v2 5/6] dm: sunxi: Modify the GPIO driver to support driver model Simon Glass
2014-10-24 9:08 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28 0:05 ` Simon Glass
2014-10-28 2:53 ` Chen-Yu Tsai
2014-10-28 3:29 ` Simon Glass
2014-10-28 3:39 ` Chen-Yu Tsai
2014-10-28 14:30 ` Maxime Ripard
2014-10-23 4:02 ` [U-Boot] [PATCH v2 6/6] dm: sunxi: Add support for serial using " Simon Glass
2014-10-24 9:10 ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-24 9:42 ` [U-Boot] [PATCH v2 " Ian Campbell
2014-10-28 0:06 ` Simon Glass
2014-10-29 8:05 ` Ian Campbell
2014-10-29 19:28 ` Simon Glass
2014-10-30 9:08 ` Ian Campbell
2014-10-30 9:36 ` Hans de Goede
2014-10-30 10:14 ` Ian Campbell
2014-10-31 2:45 ` Simon Glass
2014-10-31 9:07 ` Hans de Goede
2014-10-31 9:30 ` Ian Campbell
2014-10-31 9:33 ` Hans de Goede
2014-10-31 9:55 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5450B41F.4010302@redhat.com \
--to=hdegoede@redhat.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox