summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/board-marzen-reference.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-07-06 17:15:48 -0700
committerOlof Johansson <olof@lixom.net>2014-07-06 17:16:16 -0700
commit21760aedabc795a6758bf15fafcd59fe0799cd9f (patch)
treed63b61d178d8a11a085fc3a6497137d85f45b34c /arch/arm/mach-shmobile/board-marzen-reference.c
parent5bf521b813776e983bfc1ef21898391e51773c1d (diff)
parentc1a0f9932b66b2298163c31f8ac3f2844476e1c2 (diff)
Merge tag 'renesas-r8a7779-multiplatform-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
Pull "Renesas ARM Based SoC r8a7779-multiplatform Updates for v3.17" from Simon Horman: Move r8a7779 SoC and its Marzen board to use common clocks, multiplatform and initialise SCIF (serial) devices using DT. * tag 'renesas-r8a7779-multiplatform-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (32 commits) ARM: shmobile: marzen: Do not use workaround for scif devices ARM: shmobile: marzen: Initialise SCIF devices using DT ARM: shmobile: marzen: Remove early_printk from command line ARM: shmobile: r8a7779: Add scif nodes to dtsi ARM: shmobile: r8a7779 dtsi: Correct #address-cells/#size-cells for clocks ARM: shmobile: r8a7779 dtsi: Update unit-addresses for clocks ARM: shmobile: r8a7779: Remove unused r8a7779_init_delay() ARM: shmobile: marzen-reference: Use DT CPU Frequency ARM: shmobile: r8a7779: Use DT CPU Frequency in common case ARM: shmobile: r8a7779: Add Maximum CPU Frequency to DTS ARM: shmobile: marzen-reference: Remove legacy clock support ARM: shmobile: Remove Marzen reference DTS ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB ARM: shmobile: Remove non-multiplatform Marzen reference support ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU ARM: shmobile: marzen-reference: Initialize CPG device ARM: shmobile: r8a7779: Initial multiplatform support ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board code ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c ARM: shmobile: r8a7779: Add helper to read mode pins ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile/board-marzen-reference.c')
-rw-r--r--arch/arm/mach-shmobile/board-marzen-reference.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 2773936bf7dc..0a000b74ac6d 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -19,19 +19,40 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <linux/clk/shmobile.h>
+#include <linux/clocksource.h>
+#include <linux/of_platform.h>
#include <mach/r8a7779.h>
-#include <mach/common.h>
-#include <mach/irqs.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
+#include "clock.h"
+#include "common.h"
+#include "irqs.h"
+
+static void __init marzen_init_timer(void)
+{
+ r8a7779_clocks_init(r8a7779_read_mode_pins());
+ clocksource_of_init();
+}
+
+/*
+ * This is a really crude hack to provide clkdev support to platform
+ * devices until they get moved to DT.
+ */
+static const struct clk_name clk_names[] __initconst = {
+ { "tmu0", "fck", "sh-tmu.0" },
+};
static void __init marzen_init(void)
{
+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
r8a7779_add_standard_devices_dt();
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
}
static const char *marzen_boards_compat_dt[] __initdata = {
+ "renesas,marzen",
"renesas,marzen-reference",
NULL,
};
@@ -39,7 +60,8 @@ static const char *marzen_boards_compat_dt[] __initdata = {
DT_MACHINE_START(MARZEN, "marzen")
.smp = smp_ops(r8a7779_smp_ops),
.map_io = r8a7779_map_io,
- .init_early = r8a7779_init_delay,
+ .init_early = shmobile_init_delay,
+ .init_time = marzen_init_timer,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = r8a7779_init_irq_dt,
.init_machine = marzen_init,