aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/v2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-vexpress/v2m.c')
-rw-r--r--arch/arm/mach-vexpress/v2m.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 1edae65a0e7..63ef663fb0b 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -7,6 +7,7 @@
7#include <linux/io.h> 7#include <linux/io.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/platform_device.h> 9#include <linux/platform_device.h>
10#include <linux/ata_platform.h>
10#include <linux/smsc911x.h> 11#include <linux/smsc911x.h>
11#include <linux/spinlock.h> 12#include <linux/spinlock.h>
12#include <linux/sysdev.h> 13#include <linux/sysdev.h>
@@ -48,13 +49,15 @@ void __init v2m_map_io(struct map_desc *tile, size_t num)
48 iotable_init(tile, num); 49 iotable_init(tile, num);
49} 50}
50 51
52void __init v2m_init_early(void)
53{
54 versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
55}
51 56
52static void __init v2m_timer_init(void) 57static void __init v2m_timer_init(void)
53{ 58{
54 u32 scctrl; 59 u32 scctrl;
55 60
56 versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
57
58 /* Select 1MHz TIMCLK as the reference clock for SP804 timers */ 61 /* Select 1MHz TIMCLK as the reference clock for SP804 timers */
59 scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL)); 62 scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL));
60 scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK; 63 scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK;
@@ -249,6 +252,29 @@ static struct platform_device v2m_flash_device = {
249 .dev.platform_data = &v2m_flash_data, 252 .dev.platform_data = &v2m_flash_data,
250}; 253};
251 254
255static struct pata_platform_info v2m_pata_data = {
256 .ioport_shift = 2,
257};
258
259static struct resource v2m_pata_resources[] = {
260 {
261 .start = V2M_CF,
262 .end = V2M_CF + 0xff,
263 .flags = IORESOURCE_MEM,
264 }, {
265 .start = V2M_CF + 0x100,
266 .end = V2M_CF + SZ_4K - 1,
267 .flags = IORESOURCE_MEM,
268 },
269};
270
271static struct platform_device v2m_cf_device = {
272 .name = "pata_platform",
273 .id = -1,
274 .resource = v2m_pata_resources,
275 .num_resources = ARRAY_SIZE(v2m_pata_resources),
276 .dev.platform_data = &v2m_pata_data,
277};
252 278
253static unsigned int v2m_mmci_status(struct device *dev) 279static unsigned int v2m_mmci_status(struct device *dev)
254{ 280{
@@ -363,6 +389,7 @@ static int __init v2m_init(void)
363 platform_device_register(&v2m_pcie_i2c_device); 389 platform_device_register(&v2m_pcie_i2c_device);
364 platform_device_register(&v2m_ddc_i2c_device); 390 platform_device_register(&v2m_ddc_i2c_device);
365 platform_device_register(&v2m_flash_device); 391 platform_device_register(&v2m_flash_device);
392 platform_device_register(&v2m_cf_device);
366 platform_device_register(&v2m_eth_device); 393 platform_device_register(&v2m_eth_device);
367 platform_device_register(&v2m_usb_device); 394 platform_device_register(&v2m_usb_device);
368 395