[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201304231725.34826.arnd@arndb.de>
Date: Tue, 23 Apr 2013 17:25:34 +0200
From: Arnd Bergmann <arnd@...db.de>
To: James Hogan <james.hogan@...tec.com>
Cc: linux-kernel@...r.kernel.org,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
Linus Walleij <linus.walleij@...aro.org>,
devicetree-discuss@...ts.ozlabs.org, Rob Landley <rob@...dley.net>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/8] metag: minimal TZ1090 (Comet) SoC infrastructure
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.
> 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.
> 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.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists