* [PATCH 3/8] ARM: shmobile: Initial r8a7794 Alt board support
@ 2014-08-18 15:51 Ulrich Hecht
2014-08-18 23:37 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Hecht @ 2014-08-18 15:51 UTC (permalink / raw)
To: linux-sh
Minimal board support, based on work by Hisashi Nakamura.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm/mach-shmobile/Kconfig | 5 ++++
arch/arm/mach-shmobile/Makefile | 1 +
arch/arm/mach-shmobile/board-alt-reference.c | 38 ++++++++++++++++++++++++++++
3 files changed, 44 insertions(+)
create mode 100644 arch/arm/mach-shmobile/board-alt-reference.c
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 0ef01d4..9c4a670 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -62,6 +62,11 @@ config MACH_MARZEN
depends on ARCH_R8A7779
select REGULATOR_FIXED_VOLTAGE if REGULATOR
+config MACH_ALT
+ bool "Alt board"
+ depends on ARCH_R8A7794
+ select MICREL_PHY if SH_ETH
+
comment "Renesas ARM SoCs System Configuration"
endif
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 315784f..ec0cd31 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -64,6 +64,7 @@ ifdef CONFIG_ARCH_SHMOBILE_MULTI
obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o
+obj-$(CONFIG_MACH_ALT) += board-alt-reference.o
else
obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o
diff --git a/arch/arm/mach-shmobile/board-alt-reference.c b/arch/arm/mach-shmobile/board-alt-reference.c
new file mode 100644
index 0000000..c74935e
--- /dev/null
+++ b/arch/arm/mach-shmobile/board-alt-reference.c
@@ -0,0 +1,38 @@
+/*
+ * Alt board support - Reference DT implementation
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ * Copyright (C) 2014 Ulrich Hecht
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/of_platform.h>
+#include "common.h"
+#include "rcar-gen2.h"
+#include <asm/mach/arch.h>
+
+static void __init alt_add_standard_devices(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char * const alt_boards_compat_dt[] __initconst = {
+ "renesas,alt-reference",
+ NULL,
+};
+
+DT_MACHINE_START(ALT_DT, "alt")
+ .init_early = shmobile_init_delay,
+ .init_time = rcar_gen2_timer_init,
+ .init_machine = alt_add_standard_devices,
+ .init_late = shmobile_init_late,
+ .dt_compat = alt_boards_compat_dt,
+MACHINE_END
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/8] ARM: shmobile: Initial r8a7794 Alt board support
2014-08-18 15:51 [PATCH 3/8] ARM: shmobile: Initial r8a7794 Alt board support Ulrich Hecht
@ 2014-08-18 23:37 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-08-18 23:37 UTC (permalink / raw)
To: linux-sh
On Mon, Aug 18, 2014 at 05:51:42PM +0200, Ulrich Hecht wrote:
> Minimal board support, based on work by Hisashi Nakamura.
I believe we should drop this patch and add Alt without a board file.
There are patches queued up to remove the board file for Genmai.
The one for kzm9d was removed long ago. And in general I believe
no-board-file is the direction we would like to go in.
Although I am recommending dropping this patch I would like to make a
comment on it. I have done so below.
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> arch/arm/mach-shmobile/Kconfig | 5 ++++
> arch/arm/mach-shmobile/Makefile | 1 +
> arch/arm/mach-shmobile/board-alt-reference.c | 38 ++++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+)
> create mode 100644 arch/arm/mach-shmobile/board-alt-reference.c
>
> diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
> index 0ef01d4..9c4a670 100644
> --- a/arch/arm/mach-shmobile/Kconfig
> +++ b/arch/arm/mach-shmobile/Kconfig
> @@ -62,6 +62,11 @@ config MACH_MARZEN
> depends on ARCH_R8A7779
> select REGULATOR_FIXED_VOLTAGE if REGULATOR
>
> +config MACH_ALT
> + bool "Alt board"
> + depends on ARCH_R8A7794
> + select MICREL_PHY if SH_ETH
> +
> comment "Renesas ARM SoCs System Configuration"
> endif
>
> diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
> index 315784f..ec0cd31 100644
> --- a/arch/arm/mach-shmobile/Makefile
> +++ b/arch/arm/mach-shmobile/Makefile
> @@ -64,6 +64,7 @@ ifdef CONFIG_ARCH_SHMOBILE_MULTI
> obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
> obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
> obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o
> +obj-$(CONFIG_MACH_ALT) += board-alt-reference.o
> else
> obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
> obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o
> diff --git a/arch/arm/mach-shmobile/board-alt-reference.c b/arch/arm/mach-shmobile/board-alt-reference.c
> new file mode 100644
> index 0000000..c74935e
> --- /dev/null
> +++ b/arch/arm/mach-shmobile/board-alt-reference.c
> @@ -0,0 +1,38 @@
> +/*
> + * Alt board support - Reference DT implementation
> + *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> + * Copyright (C) 2014 Ulrich Hecht
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; version 2 of the License.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/of_platform.h>
> +#include "common.h"
> +#include "rcar-gen2.h"
> +#include <asm/mach/arch.h>
> +
> +static void __init alt_add_standard_devices(void)
> +{
> + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +}
> +
> +static const char * const alt_boards_compat_dt[] __initconst = {
> + "renesas,alt-reference",
> + NULL,
> +};
> +
> +DT_MACHINE_START(ALT_DT, "alt")
> + .init_early = shmobile_init_delay,
> + .init_time = rcar_gen2_timer_init,
> + .init_machine = alt_add_standard_devices,
> + .init_late = shmobile_init_late,
> + .dt_compat = alt_boards_compat_dt,
> +MACHINE_END
I do not think you need to set .init_machine if there is only
a call to of_platform_populate() as of_platform_populate() is called
if .init_machine is NULL. I do think we want to only call
of_platform_populate() and thus we do want .init_machine to be NULL.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-18 23:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 15:51 [PATCH 3/8] ARM: shmobile: Initial r8a7794 Alt board support Ulrich Hecht
2014-08-18 23:37 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).