aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ap4evb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-ap4evb.c')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 1a8118c929be..1e35fa976d64 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -24,9 +24,9 @@
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/mfd/sh_mobile_sdhi.h>
28#include <linux/mfd/tmio.h> 27#include <linux/mfd/tmio.h>
29#include <linux/mmc/host.h> 28#include <linux/mmc/host.h>
29#include <linux/mmc/sh_mobile_sdhi.h>
30#include <linux/mtd/mtd.h> 30#include <linux/mtd/mtd.h>
31#include <linux/mtd/partitions.h> 31#include <linux/mtd/partitions.h>
32#include <linux/mtd/physmap.h> 32#include <linux/mtd/physmap.h>
@@ -312,7 +312,7 @@ static struct resource sdhi0_resources[] = {
312 [0] = { 312 [0] = {
313 .name = "SDHI0", 313 .name = "SDHI0",
314 .start = 0xe6850000, 314 .start = 0xe6850000,
315 .end = 0xe68501ff, 315 .end = 0xe68500ff,
316 .flags = IORESOURCE_MEM, 316 .flags = IORESOURCE_MEM,
317 }, 317 },
318 [1] = { 318 [1] = {
@@ -345,7 +345,7 @@ static struct resource sdhi1_resources[] = {
345 [0] = { 345 [0] = {
346 .name = "SDHI1", 346 .name = "SDHI1",
347 .start = 0xe6860000, 347 .start = 0xe6860000,
348 .end = 0xe68601ff, 348 .end = 0xe68600ff,
349 .flags = IORESOURCE_MEM, 349 .flags = IORESOURCE_MEM,
350 }, 350 },
351 [1] = { 351 [1] = {
@@ -923,7 +923,8 @@ static struct platform_device ceu_device = {
923 .num_resources = ARRAY_SIZE(ceu_resources), 923 .num_resources = ARRAY_SIZE(ceu_resources),
924 .resource = ceu_resources, 924 .resource = ceu_resources,
925 .dev = { 925 .dev = {
926 .platform_data = &sh_mobile_ceu_info, 926 .platform_data = &sh_mobile_ceu_info,
927 .coherent_dma_mask = 0xffffffff,
927 }, 928 },
928}; 929};
929 930
@@ -946,7 +947,7 @@ static struct platform_device *ap4evb_devices[] __initdata = {
946 &ap4evb_camera, 947 &ap4evb_camera,
947}; 948};
948 949
949static int __init hdmi_init_pm_clock(void) 950static void __init hdmi_init_pm_clock(void)
950{ 951{
951 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); 952 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
952 int ret; 953 int ret;
@@ -987,20 +988,15 @@ static int __init hdmi_init_pm_clock(void)
987 pr_debug("PLLC2 set frequency %lu\n", rate); 988 pr_debug("PLLC2 set frequency %lu\n", rate);
988 989
989 ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); 990 ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
990 if (ret < 0) { 991 if (ret < 0)
991 pr_err("Cannot set HDMI parent: %d\n", ret); 992 pr_err("Cannot set HDMI parent: %d\n", ret);
992 goto out;
993 }
994 993
995out: 994out:
996 if (!IS_ERR(hdmi_ick)) 995 if (!IS_ERR(hdmi_ick))
997 clk_put(hdmi_ick); 996 clk_put(hdmi_ick);
998 return ret;
999} 997}
1000 998
1001device_initcall(hdmi_init_pm_clock); 999static void __init fsi_init_pm_clock(void)
1002
1003static int __init fsi_init_pm_clock(void)
1004{ 1000{
1005 struct clk *fsia_ick; 1001 struct clk *fsia_ick;
1006 int ret; 1002 int ret;
@@ -1009,7 +1005,7 @@ static int __init fsi_init_pm_clock(void)
1009 if (IS_ERR(fsia_ick)) { 1005 if (IS_ERR(fsia_ick)) {
1010 ret = PTR_ERR(fsia_ick); 1006 ret = PTR_ERR(fsia_ick);
1011 pr_err("Cannot get FSI ICK: %d\n", ret); 1007 pr_err("Cannot get FSI ICK: %d\n", ret);
1012 return ret; 1008 return;
1013 } 1009 }
1014 1010
1015 ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); 1011 ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
@@ -1017,10 +1013,7 @@ static int __init fsi_init_pm_clock(void)
1017 pr_err("Cannot set FSI-A parent: %d\n", ret); 1013 pr_err("Cannot set FSI-A parent: %d\n", ret);
1018 1014
1019 clk_put(fsia_ick); 1015 clk_put(fsia_ick);
1020
1021 return ret;
1022} 1016}
1023device_initcall(fsi_init_pm_clock);
1024 1017
1025/* 1018/*
1026 * FIXME !! 1019 * FIXME !!
@@ -1254,7 +1247,7 @@ static void __init ap4evb_init(void)
1254 gpio_request(GPIO_FN_KEYIN4, NULL); 1247 gpio_request(GPIO_FN_KEYIN4, NULL);
1255 1248
1256 /* enable TouchScreen */ 1249 /* enable TouchScreen */
1257 set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW); 1250 irq_set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
1258 1251
1259 tsc_device.irq = IRQ28; 1252 tsc_device.irq = IRQ28;
1260 i2c_register_board_info(1, &tsc_device, 1); 1253 i2c_register_board_info(1, &tsc_device, 1);
@@ -1310,7 +1303,7 @@ static void __init ap4evb_init(void)
1310 lcdc_info.ch[0].lcd_size_cfg.height = 91; 1303 lcdc_info.ch[0].lcd_size_cfg.height = 91;
1311 1304
1312 /* enable TouchScreen */ 1305 /* enable TouchScreen */
1313 set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW); 1306 irq_set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1314 1307
1315 tsc_device.irq = IRQ7; 1308 tsc_device.irq = IRQ7;
1316 i2c_register_board_info(0, &tsc_device, 1); 1309 i2c_register_board_info(0, &tsc_device, 1);
@@ -1347,6 +1340,9 @@ static void __init ap4evb_init(void)
1347 __raw_writel(srcr4 & ~(1 << 13), SRCR4); 1340 __raw_writel(srcr4 & ~(1 << 13), SRCR4);
1348 1341
1349 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); 1342 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
1343
1344 hdmi_init_pm_clock();
1345 fsi_init_pm_clock();
1350} 1346}
1351 1347
1352static void __init ap4evb_timer_init(void) 1348static void __init ap4evb_timer_init(void)