From: James Hogan <james.hogan@imgtec.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Linus Walleij <linus.walleij@linaro.org>,
devicetree-discuss@lists.ozlabs.org,
Rob Landley <rob@landley.net>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/8] metag: minimal TZ1090 (Comet) SoC infrastructure
Date: Tue, 23 Apr 2013 17:06:11 +0100 [thread overview]
Message-ID: <5176B173.40107@imgtec.com> (raw)
In-Reply-To: <201304231725.34826.arnd@arndb.de>
Thanks for reviewing Arnd.
On 23/04/13 16:25, Arnd Bergmann wrote:
> On Tuesday 23 April 2013, James Hogan wrote:
>
>> @@ -46,6 +46,12 @@ core-y += arch/metag/boot/dts/
>> core-y += arch/metag/kernel/
>> core-y += arch/metag/mm/
>>
>> +# SoCs
>> +socdir-$(CONFIG_SOC_TZ1090) += tz1090
>> +
>> +socdirs := $(filter-out ., $(patsubst %,%/,$(socdir-y)))
>> +core-y += $(addprefix arch/metag/soc/, $(socdirs))
>> +
>
> Does it actually make sense to have subdirectories per soc? I would
> suggest you copy from arm64 rather from arm for the platform support and
> do it as minimal as possible. Any code you need can go into a shared directory
> as a start, and if you end up needing more of a hierarchical structure,
> you can add that later. Hopefully we've come to the point now where almost
> everything can live in drivers/* though.
Where is the shared directory for arm64 platforms? (arch/arm64 is
looking pretty bare).
It's certainly heading in that direction a lot. For this patchset I
could get away with dropping arch/metag/soc/*, and deal with anything
that really requires something like it later.
The machine callbacks I was planning on using in future patches are:
* init_time() for calling into the appropriate common clock driver from
time_init(), prior to setting up the timer so that the right frequency
can be reported based on the clock hierarchy specified in DT. I guess
this could be made more general, allowing any enabled clock component to
be initialised at this time.
* init_irq(), for dynamically detecting evaluation silicon and if so
telling the interrupt controller that there are no mask registers (easy
to drop tbh since nobody uses TZ1090 evaluation silicon any longer).
* probably something for setting up power management (suspend to ram /
standby and associated asm code), which would also be used by some
TZ1090 based boards requiring their own power management variations.
>
>> diff --git a/arch/metag/configs/tz1090_defconfig b/arch/metag/configs/tz1090_defconfig
>> new file mode 100644
>> index 0000000..4794094
>> --- /dev/null
>> +++ b/arch/metag/configs/tz1090_defconfig
>
> Also, if this is compatible with your previous platform, I would recommend just
> having a single defconfig that runs on all supported hardware. It's easy enough
> for users to turn off the drivers and platforms they don't need.
Unfortunately the selects in the SOC_TZ1090 are important as they enable
workarounds for hardware quirks which would have a performance impact on
newer cores without those quirks. At the moment (i.e. without doing
dynamic fixups of kernel code like I believe x86 does, and without an
updated compiler that can support fast jump labels), we can probably
only achieve single-SoC multi-board support in a given kernel, at least
when it comes to the TZ1090.
>
>> diff --git a/arch/metag/soc/tz1090/setup.c b/arch/metag/soc/tz1090/setup.c
>> new file mode 100644
>> index 0000000..fbd7074
>> --- /dev/null
>> +++ b/arch/metag/soc/tz1090/setup.c
>> +
>> +#include <linux/init.h>
>> +#include <asm/mach/arch.h>
>> +
>> +static const char *tz1090_boards_compat[] __initdata = {
>> + "toumaz,tz1090",
>> + NULL,
>> +};
>> +
>> +MACHINE_START(TZ1090, "Generic TZ1090")
>> + .dt_compat = tz1090_boards_compat,
>> +MACHINE_END
>
> Have you looked at the patch I sent for default platform code on ARM?
> The idea is to default to an empty machine descriptor if nothing matches
> the root compatible entry of the DT. The same would work here to allow
> you to run without any board code at all.
No I hadn't seen that. I'll look into it. This was meant as a stub to
later be extended, and at the moment without this we would fall back to
an almost identical definition in arch/metag/kernel/machines.c which
wouldn't do any harm at this stage.
Thanks
James
WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@imgtec.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Linus Walleij <linus.walleij@linaro.org>,
<devicetree-discuss@lists.ozlabs.org>,
"Rob Landley" <rob@landley.net>, <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 2/8] metag: minimal TZ1090 (Comet) SoC infrastructure
Date: Tue, 23 Apr 2013 17:06:11 +0100 [thread overview]
Message-ID: <5176B173.40107@imgtec.com> (raw)
In-Reply-To: <201304231725.34826.arnd@arndb.de>
Thanks for reviewing Arnd.
On 23/04/13 16:25, Arnd Bergmann wrote:
> On Tuesday 23 April 2013, James Hogan wrote:
>
>> @@ -46,6 +46,12 @@ core-y += arch/metag/boot/dts/
>> core-y += arch/metag/kernel/
>> core-y += arch/metag/mm/
>>
>> +# SoCs
>> +socdir-$(CONFIG_SOC_TZ1090) += tz1090
>> +
>> +socdirs := $(filter-out ., $(patsubst %,%/,$(socdir-y)))
>> +core-y += $(addprefix arch/metag/soc/, $(socdirs))
>> +
>
> Does it actually make sense to have subdirectories per soc? I would
> suggest you copy from arm64 rather from arm for the platform support and
> do it as minimal as possible. Any code you need can go into a shared directory
> as a start, and if you end up needing more of a hierarchical structure,
> you can add that later. Hopefully we've come to the point now where almost
> everything can live in drivers/* though.
Where is the shared directory for arm64 platforms? (arch/arm64 is
looking pretty bare).
It's certainly heading in that direction a lot. For this patchset I
could get away with dropping arch/metag/soc/*, and deal with anything
that really requires something like it later.
The machine callbacks I was planning on using in future patches are:
* init_time() for calling into the appropriate common clock driver from
time_init(), prior to setting up the timer so that the right frequency
can be reported based on the clock hierarchy specified in DT. I guess
this could be made more general, allowing any enabled clock component to
be initialised at this time.
* init_irq(), for dynamically detecting evaluation silicon and if so
telling the interrupt controller that there are no mask registers (easy
to drop tbh since nobody uses TZ1090 evaluation silicon any longer).
* probably something for setting up power management (suspend to ram /
standby and associated asm code), which would also be used by some
TZ1090 based boards requiring their own power management variations.
>
>> diff --git a/arch/metag/configs/tz1090_defconfig b/arch/metag/configs/tz1090_defconfig
>> new file mode 100644
>> index 0000000..4794094
>> --- /dev/null
>> +++ b/arch/metag/configs/tz1090_defconfig
>
> Also, if this is compatible with your previous platform, I would recommend just
> having a single defconfig that runs on all supported hardware. It's easy enough
> for users to turn off the drivers and platforms they don't need.
Unfortunately the selects in the SOC_TZ1090 are important as they enable
workarounds for hardware quirks which would have a performance impact on
newer cores without those quirks. At the moment (i.e. without doing
dynamic fixups of kernel code like I believe x86 does, and without an
updated compiler that can support fast jump labels), we can probably
only achieve single-SoC multi-board support in a given kernel, at least
when it comes to the TZ1090.
>
>> diff --git a/arch/metag/soc/tz1090/setup.c b/arch/metag/soc/tz1090/setup.c
>> new file mode 100644
>> index 0000000..fbd7074
>> --- /dev/null
>> +++ b/arch/metag/soc/tz1090/setup.c
>> +
>> +#include <linux/init.h>
>> +#include <asm/mach/arch.h>
>> +
>> +static const char *tz1090_boards_compat[] __initdata = {
>> + "toumaz,tz1090",
>> + NULL,
>> +};
>> +
>> +MACHINE_START(TZ1090, "Generic TZ1090")
>> + .dt_compat = tz1090_boards_compat,
>> +MACHINE_END
>
> Have you looked at the patch I sent for default platform code on ARM?
> The idea is to default to an empty machine descriptor if nothing matches
> the root compatible entry of the DT. The same would work here to allow
> you to run without any board code at all.
No I hadn't seen that. I'll look into it. This was meant as a stub to
later be extended, and at the moment without this we would fall back to
an almost identical definition in arch/metag/kernel/machines.c which
wouldn't do any harm at this stage.
Thanks
James
next prev parent reply other threads:[~2013-04-23 16:06 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 14:33 [PATCH 0/8] Add some TZ1090 SoC infrastructure James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-23 14:33 ` [PATCH 2/8] metag: minimal TZ1090 (Comet) " James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-23 15:25 ` Arnd Bergmann
2013-04-23 16:06 ` James Hogan [this message]
2013-04-23 16:06 ` James Hogan
2013-04-24 13:26 ` Catalin Marinas
2013-04-24 14:51 ` James Hogan
2013-04-24 14:51 ` James Hogan
2013-04-25 15:21 ` James Hogan
2013-04-25 15:21 ` James Hogan
2013-04-23 14:33 ` [PATCH 3/8] irq-imgpdc: add ImgTec PDC irqchip driver James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-23 15:09 ` Thomas Gleixner
2013-04-24 9:14 ` James Hogan
2013-04-24 9:14 ` James Hogan
2013-04-24 9:32 ` Thomas Gleixner
2013-04-25 11:25 ` James Hogan
2013-04-25 11:25 ` James Hogan
2013-04-23 14:33 ` [PATCH 4/8] metag: tz1090: add <asm/soc-tz1090/gpio.h> James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-25 21:52 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 5/8] pinctrl-tz1090: add TZ1090 pinctrl driver James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-25 22:39 ` Linus Walleij
2013-04-26 11:54 ` James Hogan
2013-05-03 9:13 ` Linus Walleij
2013-05-03 12:23 ` James Hogan
2013-05-03 13:03 ` Linus Walleij
2013-05-03 15:06 ` James Hogan
[not found] ` <5183D262.7000107-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2013-05-14 11:52 ` Linus Walleij
2013-05-14 11:52 ` Linus Walleij
2013-05-14 12:22 ` James Hogan
2013-05-15 19:07 ` Linus Walleij
2013-05-16 9:12 ` James Hogan
2013-05-17 6:47 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 6/8] gpio-tz1090: add TZ1090 gpio driver James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-25 23:01 ` Linus Walleij
2013-04-26 9:22 ` James Hogan
2013-05-03 8:49 ` Linus Walleij
2013-05-03 9:09 ` James Hogan
2013-05-15 19:09 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 7/8] pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver James Hogan
2013-04-23 14:33 ` James Hogan
[not found] ` <1366727607-27444-1-git-send-email-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2013-04-23 14:33 ` [PATCH 1/8] metag: of_platform_populate from arch generic code James Hogan
2013-04-23 14:33 ` James Hogan
2013-04-23 14:33 ` [PATCH 8/8] gpio-tz1090pdc: add TZ1090 PDC gpio driver James Hogan
2013-04-23 14:33 ` James Hogan
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=5176B173.40107@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.