diff options
Diffstat (limited to 'arch/sh/boards/board-sh7785lcr.c')
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index e5a8a2fde39c..fe7e686c94ac 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/i2c-algo-pca.h> | 21 | #include <linux/i2c-algo-pca.h> |
22 | #include <linux/usb/r8a66597.h> | 22 | #include <linux/usb/r8a66597.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/io.h> | ||
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
25 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
26 | #include <mach/sh7785lcr.h> | 27 | #include <mach/sh7785lcr.h> |
@@ -32,26 +33,17 @@ | |||
32 | * NOTE: This board has 2 physical memory maps. | 33 | * NOTE: This board has 2 physical memory maps. |
33 | * Please look at include/asm-sh/sh7785lcr.h or hardware manual. | 34 | * Please look at include/asm-sh/sh7785lcr.h or hardware manual. |
34 | */ | 35 | */ |
35 | static struct resource heartbeat_resources[] = { | 36 | static struct resource heartbeat_resource = { |
36 | [0] = { | 37 | .start = PLD_LEDCR, |
37 | .start = PLD_LEDCR, | 38 | .end = PLD_LEDCR, |
38 | .end = PLD_LEDCR, | 39 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT, |
39 | .flags = IORESOURCE_MEM, | ||
40 | }, | ||
41 | }; | ||
42 | |||
43 | static struct heartbeat_data heartbeat_data = { | ||
44 | .regsize = 8, | ||
45 | }; | 40 | }; |
46 | 41 | ||
47 | static struct platform_device heartbeat_device = { | 42 | static struct platform_device heartbeat_device = { |
48 | .name = "heartbeat", | 43 | .name = "heartbeat", |
49 | .id = -1, | 44 | .id = -1, |
50 | .dev = { | 45 | .num_resources = 1, |
51 | .platform_data = &heartbeat_data, | 46 | .resource = &heartbeat_resource, |
52 | }, | ||
53 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
54 | .resource = heartbeat_resources, | ||
55 | }; | 47 | }; |
56 | 48 | ||
57 | static struct mtd_partition nor_flash_partitions[] = { | 49 | static struct mtd_partition nor_flash_partitions[] = { |
@@ -341,8 +333,14 @@ static void __init sh7785lcr_setup(char **cmdline_p) | |||
341 | pm_power_off = sh7785lcr_power_off; | 333 | pm_power_off = sh7785lcr_power_off; |
342 | 334 | ||
343 | /* sm501 DRAM configuration */ | 335 | /* sm501 DRAM configuration */ |
344 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; | 336 | sm501_reg = ioremap_nocache(SM107_REG_ADDR, SM501_DRAM_CONTROL); |
345 | writel(0x000307c2, sm501_reg); | 337 | if (!sm501_reg) { |
338 | printk(KERN_ERR "%s: ioremap error.\n", __func__); | ||
339 | return; | ||
340 | } | ||
341 | |||
342 | writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); | ||
343 | iounmap(sm501_reg); | ||
346 | } | 344 | } |
347 | 345 | ||
348 | /* Return the board specific boot mode pin configuration */ | 346 | /* Return the board specific boot mode pin configuration */ |