aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-07-09 09:12:43 -0400
committerSimon Horman <horms+renesas@verge.net.au>2014-08-16 20:00:56 -0400
commit5ecd7a5185008723056a4b70815aa017272ca751 (patch)
tree8cc8cea95c163cd9ef946db8f54b9725fb306f81 /arch/arm/mach-shmobile
parent6a1d9460df90f96e31922ad5c891c5c54a4c7f4e (diff)
ARM: shmobile: marzen-reference: Enable TMU0 in device tree
No more device needs to be added from platform code when booting the reference platform, remove the now empty r8a7779_add_standard_devices_dt() function completely. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-marzen-reference.c10
-rw-r--r--arch/arm/mach-shmobile/r8a7779.h1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c17
3 files changed, 5 insertions, 23 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 21b3e1ca2261..f6710033c429 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -37,18 +37,8 @@ static void __init marzen_init_timer(void)
37 clocksource_of_init(); 37 clocksource_of_init();
38} 38}
39 39
40/*
41 * This is a really crude hack to provide clkdev support to platform
42 * devices until they get moved to DT.
43 */
44static const struct clk_name clk_names[] __initconst = {
45 { "tmu0", "fck", "sh-tmu.0" },
46};
47
48static void __init marzen_init(void) 40static void __init marzen_init(void)
49{ 41{
50 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
51 r8a7779_add_standard_devices_dt();
52 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 42 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
53 r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ 43 r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
54} 44}
diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
index 5415c719dc19..19f97046dd70 100644
--- a/arch/arm/mach-shmobile/r8a7779.h
+++ b/arch/arm/mach-shmobile/r8a7779.h
@@ -17,7 +17,6 @@ extern void r8a7779_map_io(void);
17extern void r8a7779_earlytimer_init(void); 17extern void r8a7779_earlytimer_init(void);
18extern void r8a7779_add_early_devices(void); 18extern void r8a7779_add_early_devices(void);
19extern void r8a7779_add_standard_devices(void); 19extern void r8a7779_add_standard_devices(void);
20extern void r8a7779_add_standard_devices_dt(void);
21extern void r8a7779_init_late(void); 20extern void r8a7779_init_late(void);
22extern u32 r8a7779_read_mode_pins(void); 21extern u32 r8a7779_read_mode_pins(void);
23extern void r8a7779_clock_init(void); 22extern void r8a7779_clock_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 236c1befb9e3..11ceee607464 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -641,7 +641,7 @@ static void __init r8a7779_register_hpb_dmae(void)
641 sizeof(dma_platform_data)); 641 sizeof(dma_platform_data));
642} 642}
643 643
644static struct platform_device *r8a7779_devices_dt[] __initdata = { 644static struct platform_device *r8a7779_early_devices[] __initdata = {
645 &tmu0_device, 645 &tmu0_device,
646}; 646};
647 647
@@ -669,8 +669,8 @@ void __init r8a7779_add_standard_devices(void)
669 669
670 r8a7779_init_pm_domains(); 670 r8a7779_init_pm_domains();
671 671
672 platform_add_devices(r8a7779_devices_dt, 672 platform_add_devices(r8a7779_early_devices,
673 ARRAY_SIZE(r8a7779_devices_dt)); 673 ARRAY_SIZE(r8a7779_early_devices));
674 platform_add_devices(r8a7779_standard_devices, 674 platform_add_devices(r8a7779_standard_devices,
675 ARRAY_SIZE(r8a7779_standard_devices)); 675 ARRAY_SIZE(r8a7779_standard_devices));
676 r8a7779_register_hpb_dmae(); 676 r8a7779_register_hpb_dmae();
@@ -678,8 +678,8 @@ void __init r8a7779_add_standard_devices(void)
678 678
679void __init r8a7779_add_early_devices(void) 679void __init r8a7779_add_early_devices(void)
680{ 680{
681 early_platform_add_devices(r8a7779_devices_dt, 681 early_platform_add_devices(r8a7779_early_devices,
682 ARRAY_SIZE(r8a7779_devices_dt)); 682 ARRAY_SIZE(r8a7779_early_devices));
683 683
684 /* Early serial console setup is not included here due to 684 /* Early serial console setup is not included here due to
685 * memory map collisions. The SCIF serial ports in r8a7779 685 * memory map collisions. The SCIF serial ports in r8a7779
@@ -739,12 +739,6 @@ void __init r8a7779_init_irq_dt(void)
739 __raw_writel(0x003fee3f, INT2SMSKCR4); 739 __raw_writel(0x003fee3f, INT2SMSKCR4);
740} 740}
741 741
742void __init r8a7779_add_standard_devices_dt(void)
743{
744 platform_add_devices(r8a7779_devices_dt,
745 ARRAY_SIZE(r8a7779_devices_dt));
746}
747
748#define MODEMR 0xffcc0020 742#define MODEMR 0xffcc0020
749 743
750u32 __init r8a7779_read_mode_pins(void) 744u32 __init r8a7779_read_mode_pins(void)
@@ -773,7 +767,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
773 .init_early = shmobile_init_delay, 767 .init_early = shmobile_init_delay,
774 .nr_irqs = NR_IRQS_LEGACY, 768 .nr_irqs = NR_IRQS_LEGACY,
775 .init_irq = r8a7779_init_irq_dt, 769 .init_irq = r8a7779_init_irq_dt,
776 .init_machine = r8a7779_add_standard_devices_dt,
777 .init_late = r8a7779_init_late, 770 .init_late = r8a7779_init_late,
778 .dt_compat = r8a7779_compat_dt, 771 .dt_compat = r8a7779_compat_dt,
779MACHINE_END 772MACHINE_END