Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / arm / mach-shmobile / board-g4evm.c
index 33441d5..2c3ff6f 100644 (file)
@@ -37,6 +37,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/mach/time.h>
 
 /*
  * SDHI
@@ -116,7 +117,7 @@ static struct platform_device nor_flash_device = {
 };
 
 /* USBHS */
-void usb_host_port_power(int port, int power)
+static void usb_host_port_power(int port, int power)
 {
        if (!power) /* only power-on supported for now */
                return;
@@ -138,8 +139,7 @@ static struct resource usb_host_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 65,
-               .end    = 65,
+               .start  = evt2irq(0x0a20), /* USBHS_USHI0 */
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -180,7 +180,7 @@ static struct resource keysc_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 79,
+               .start  = evt2irq(0x0be0), /* KEYSC_KEY */
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -204,7 +204,7 @@ static struct resource sdhi0_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 96,
+               .start  = evt2irq(0x0e00), /* SDHI0 */
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -224,7 +224,7 @@ static struct resource sdhi1_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 100,
+               .start  = evt2irq(0x0e80), /* SDHI1 */
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -260,9 +260,8 @@ static void __init g4evm_map_io(void)
 {
        iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc));
 
-       /* setup early devices, clocks and console here as well */
+       /* setup early devices and console here as well */
        sh7377_add_early_devices();
-       sh7367_clock_init(); /* use g3 clocks for now */
        shmobile_setup_console();
 }
 
@@ -328,9 +327,6 @@ static void __init g4evm_init(void)
        gpio_request(GPIO_FN_EXTLP, NULL);
        gpio_request(GPIO_FN_IDIN, NULL);
 
-       /* enable clock in SMSTPCR3 */
-       __raw_writel(__raw_readl(0xe615013c) & ~(1 << 22), 0xe615013c);
-
        /* setup USB phy */
        __raw_writew(0x0200, 0xe605810a);       /* USBCR1 */
        __raw_writew(0x00e0, 0xe60581c0);       /* CPFCH */
@@ -385,11 +381,21 @@ static void __init g4evm_init(void)
        platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
 }
 
+static void __init g4evm_timer_init(void)
+{
+       sh7377_clock_init();
+       shmobile_timer.init();
+}
+
+static struct sys_timer g4evm_timer = {
+       .init           = g4evm_timer_init,
+};
+
 MACHINE_START(G4EVM, "g4evm")
        .phys_io        = 0xe6000000,
        .io_pg_offst    = ((0xe6000000) >> 18) & 0xfffc,
        .map_io         = g4evm_map_io,
        .init_irq       = sh7377_init_irq,
        .init_machine   = g4evm_init,
-       .timer          = &shmobile_timer,
+       .timer          = &g4evm_timer,
 MACHINE_END