Merge tag 'timer' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[pandora-kernel.git] / arch / arm / mach-shmobile / board-mackerel.c
index e761b28..bd4253b 100644 (file)
@@ -57,8 +57,6 @@
 #include <mach/sh7372.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-#include <asm/mach/map.h>
 #include <asm/mach-types.h>
 
 /*
@@ -854,7 +852,7 @@ static int __fsi_set_round_rate(struct clk *clk, long rate, int enable)
        return clk_enable(clk);
 }
 
-static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
+static int fsi_b_set_rate(struct device *dev, int rate, int enable)
 {
        struct clk *fsib_clk;
        struct clk *fdiv_clk = &sh7372_fsidivb_clk;
@@ -863,10 +861,6 @@ static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
        int ackmd_bpfmd;
        int ret;
 
-       /* FSIA is slave mode. nothing to do here */
-       if (is_porta)
-               return 0;
-
        /* clock start */
        switch (rate) {
        case 44100:
@@ -910,14 +904,16 @@ fsi_set_rate_end:
 }
 
 static struct sh_fsi_platform_info fsi_info = {
-       .porta_flags =  SH_FSI_BRS_INV,
-
-       .portb_flags =  SH_FSI_BRS_INV  |
+       .port_a = {
+               .flags = SH_FSI_BRS_INV,
+       },
+       .port_b = {
+               .flags = SH_FSI_BRS_INV |
                        SH_FSI_BRM_INV  |
                        SH_FSI_LRS_INV  |
                        SH_FSI_FMT_SPDIF,
-
-       .set_rate = fsi_set_rate,
+               .set_rate = fsi_b_set_rate,
+       }
 };
 
 static struct resource fsi_resources[] = {
@@ -1331,25 +1327,13 @@ static struct i2c_board_info i2c1_devices[] = {
        },
 };
 
-static struct map_desc mackerel_io_desc[] __initdata = {
-       /* create a 1:1 entity map for 0xe6xxxxxx
-        * used by CPGA, INTC and PFC.
-        */
-       {
-               .virtual        = 0xe6000000,
-               .pfn            = __phys_to_pfn(0xe6000000),
-               .length         = 256 << 20,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
 static void __init mackerel_map_io(void)
 {
-       iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
-
-       /* setup early devices and console here as well */
-       sh7372_add_early_devices();
-       shmobile_setup_console();
+       sh7372_map_io();
+       /* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
+        * enough to allocate the frame buffer memory.
+        */
+       init_consistent_dma_size(12 << 20);
 }
 
 #define GPIO_PORT9CR   0xE6051009
@@ -1364,6 +1348,9 @@ static void __init mackerel_init(void)
        struct clk *clk;
        int ret;
 
+       /* External clock source */
+       clk_set_rate(&sh7372_dv_clki_clk, 27000000);
+
        sh7372_pinmux_init();
 
        /* enable SCIFA0 */
@@ -1567,23 +1554,11 @@ static void __init mackerel_init(void)
        pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
 }
 
-static void __init mackerel_timer_init(void)
-{
-       sh7372_clock_init();
-       shmobile_timer.init();
-
-       /* External clock source */
-       clk_set_rate(&sh7372_dv_clki_clk, 27000000);
-}
-
-static struct sys_timer mackerel_timer = {
-       .init           = mackerel_timer_init,
-};
-
 MACHINE_START(MACKEREL, "mackerel")
        .map_io         = mackerel_map_io,
+       .init_early     = sh7372_add_early_devices,
        .init_irq       = sh7372_init_irq,
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = mackerel_init,
-       .timer          = &mackerel_timer,
+       .timer          = &shmobile_timer,
 MACHINE_END