diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-01-21 10:01:31 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-10-29 20:47:12 -0400 |
commit | 64d9c22154d77a448944733d1373c8c0af8e0de2 (patch) | |
tree | 6294478a761a4bf4b2bd4cd01a9a2f8f4ff63190 | |
parent | a7aee3ac437be568e6285c10d765ec074fa19587 (diff) |
ARM: shmobile: lager-reference: Remove DU platform device
The DU device is now instantiated from the device tree, remove the
corresponding platform device.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/board-lager-reference.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 93f31b70c5a6..fa06bdba61df 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -14,94 +14,15 @@ | |||
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/dma-mapping.h> | ||
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
20 | #include <linux/platform_data/rcar-du.h> | ||
21 | 19 | ||
22 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
23 | 21 | ||
24 | #include "clock.h" | ||
25 | #include "common.h" | 22 | #include "common.h" |
26 | #include "irqs.h" | ||
27 | #include "r8a7790.h" | 23 | #include "r8a7790.h" |
28 | #include "rcar-gen2.h" | 24 | #include "rcar-gen2.h" |
29 | 25 | ||
30 | /* DU */ | ||
31 | static struct rcar_du_encoder_data lager_du_encoders[] = { | ||
32 | { | ||
33 | .type = RCAR_DU_ENCODER_VGA, | ||
34 | .output = RCAR_DU_OUTPUT_DPAD0, | ||
35 | }, { | ||
36 | .type = RCAR_DU_ENCODER_NONE, | ||
37 | .output = RCAR_DU_OUTPUT_LVDS1, | ||
38 | .connector.lvds.panel = { | ||
39 | .width_mm = 210, | ||
40 | .height_mm = 158, | ||
41 | .mode = { | ||
42 | .pixelclock = 65000000, | ||
43 | .hactive = 1024, | ||
44 | .hfront_porch = 20, | ||
45 | .hback_porch = 160, | ||
46 | .hsync_len = 136, | ||
47 | .vactive = 768, | ||
48 | .vfront_porch = 3, | ||
49 | .vback_porch = 29, | ||
50 | .vsync_len = 6, | ||
51 | }, | ||
52 | }, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static struct rcar_du_platform_data lager_du_pdata = { | ||
57 | .encoders = lager_du_encoders, | ||
58 | .num_encoders = ARRAY_SIZE(lager_du_encoders), | ||
59 | }; | ||
60 | |||
61 | static const struct resource du_resources[] __initconst = { | ||
62 | DEFINE_RES_MEM(0xfeb00000, 0x70000), | ||
63 | DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"), | ||
64 | DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"), | ||
65 | DEFINE_RES_IRQ(gic_spi(256)), | ||
66 | DEFINE_RES_IRQ(gic_spi(268)), | ||
67 | DEFINE_RES_IRQ(gic_spi(269)), | ||
68 | }; | ||
69 | |||
70 | static void __init lager_add_du_device(void) | ||
71 | { | ||
72 | struct platform_device_info info = { | ||
73 | .name = "rcar-du-r8a7790", | ||
74 | .id = -1, | ||
75 | .res = du_resources, | ||
76 | .num_res = ARRAY_SIZE(du_resources), | ||
77 | .data = &lager_du_pdata, | ||
78 | .size_data = sizeof(lager_du_pdata), | ||
79 | .dma_mask = DMA_BIT_MASK(32), | ||
80 | }; | ||
81 | |||
82 | platform_device_register_full(&info); | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * This is a really crude hack to provide clkdev support to platform | ||
87 | * devices until they get moved to DT. | ||
88 | */ | ||
89 | static const struct clk_name clk_names[] __initconst = { | ||
90 | { "du0", "du.0", "rcar-du-r8a7790" }, | ||
91 | { "du1", "du.1", "rcar-du-r8a7790" }, | ||
92 | { "du2", "du.2", "rcar-du-r8a7790" }, | ||
93 | { "lvds0", "lvds.0", "rcar-du-r8a7790" }, | ||
94 | { "lvds1", "lvds.1", "rcar-du-r8a7790" }, | ||
95 | }; | ||
96 | |||
97 | static void __init lager_add_standard_devices(void) | ||
98 | { | ||
99 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | ||
100 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
101 | |||
102 | lager_add_du_device(); | ||
103 | } | ||
104 | |||
105 | static const char *lager_boards_compat_dt[] __initdata = { | 26 | static const char *lager_boards_compat_dt[] __initdata = { |
106 | "renesas,lager", | 27 | "renesas,lager", |
107 | "renesas,lager-reference", | 28 | "renesas,lager-reference", |
@@ -112,7 +33,6 @@ DT_MACHINE_START(LAGER_DT, "lager") | |||
112 | .smp = smp_ops(r8a7790_smp_ops), | 33 | .smp = smp_ops(r8a7790_smp_ops), |
113 | .init_early = shmobile_init_delay, | 34 | .init_early = shmobile_init_delay, |
114 | .init_time = rcar_gen2_timer_init, | 35 | .init_time = rcar_gen2_timer_init, |
115 | .init_machine = lager_add_standard_devices, | ||
116 | .init_late = shmobile_init_late, | 36 | .init_late = shmobile_init_late, |
117 | .reserve = rcar_gen2_reserve, | 37 | .reserve = rcar_gen2_reserve, |
118 | .dt_compat = lager_boards_compat_dt, | 38 | .dt_compat = lager_boards_compat_dt, |