Merge branch 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh into renes...
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Mar 2012 22:02:16 +0000 (22:02 +0000)
committerArnd Bergmann <arnd@arndb.de>
Sat, 24 Mar 2012 19:13:31 +0000 (19:13 +0000)
Conflicts:
arch/arm/mach-shmobile/board-ap4evb.c

This moves the addition of init_consistent_dma_size() from the board
files into the common sh7372_map_io() functions where all the other
contents of the board specific map_io calls have gone.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/setup-sh7372.c
arch/sh/kernel/cpu/sh4a/clock-sh7757.c
arch/sh/kernel/cpu/sh4a/clock-sh7785.c

index 4739f039650aa8481073a75bb1166387ef585f4d,6e3fab69a5a08b071f2d9e055900cc838a834487..c92c0052712399c282cf68dfed39a4b3457fc8b6
@@@ -61,6 -61,8 +61,6 @@@
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 -#include <asm/mach/map.h>
 -#include <asm/mach/time.h>
  #include <asm/setup.h>
  
  /*
@@@ -1188,6 -1190,33 +1188,7 @@@ static struct i2c_board_info i2c1_devic
        },
  };
  
 -static struct map_desc ap4evb_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 ap4evb_map_io(void)
 -{
 -      iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
 -
 -      /*
 -       * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
 -       * enough to allocate the frame buffer memory.
 -       */
 -      init_consistent_dma_size(12 << 20);
 -
 -      /* setup early devices and console here as well */
 -      sh7372_add_early_devices();
 -      shmobile_setup_console();
 -}
  #define GPIO_PORT9CR  0xE6051009
  #define GPIO_PORT10CR 0xE605100A
  #define USCCR1                0xE6058144
@@@ -1196,9 -1225,6 +1197,9 @@@ static void __init ap4evb_init(void
        u32 srcr4;
        struct clk *clk;
  
 +      /* External clock source */
 +      clk_set_rate(&sh7372_dv_clki_clk, 27000000);
 +
        sh7372_pinmux_init();
  
        /* enable SCIFA0 */
        pm_clk_add(&lcdc1_device.dev, "hdmi");
  }
  
 -static void __init ap4evb_timer_init(void)
 -{
 -      sh7372_clock_init();
 -      shmobile_timer.init();
 -
 -      /* External clock source */
 -      clk_set_rate(&sh7372_dv_clki_clk, 27000000);
 -}
 -
 -static struct sys_timer ap4evb_timer = {
 -      .init           = ap4evb_timer_init,
 -};
 -
  MACHINE_START(AP4EVB, "ap4evb")
 -      .map_io         = ap4evb_map_io,
 +      .map_io         = sh7372_map_io,
 +      .init_early     = sh7372_add_early_devices,
        .init_irq       = sh7372_init_irq,
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = ap4evb_init,
 -      .timer          = &ap4evb_timer,
 +      .timer          = &shmobile_timer,
  MACHINE_END
index 71d279150471c3641d86bff26fa53859798fd586,7b53cda418513a63f69d34a90e903aa4d7b76f1c..55da7a1159127f776c252ce8c2479795155ee7db
@@@ -57,6 -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>
  
  /*
@@@ -1335,15 -1337,31 +1335,6 @@@ static struct i2c_board_info i2c1_devic
        },
  };
  
 -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)
--{
-       sh7372_map_io();
 -      iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
--      /* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
--       * enough to allocate the frame buffer memory.
--       */
--      init_consistent_dma_size(12 << 20);
 -
 -      /* setup early devices and console here as well */
 -      sh7372_add_early_devices();
 -      shmobile_setup_console();
--}
--
  #define GPIO_PORT9CR  0xE6051009
  #define GPIO_PORT10CR 0xE605100A
  #define GPIO_PORT167CR        0xE60520A7
@@@ -1356,9 -1374,6 +1347,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 */
        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,
++      .map_io         = sh7372_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
index c14fb35de47c9f426037a1437bb57c36682f3dce,a83cf51fc09906a13018472b4f563baebaf7bcb5..0ebbee087b5e61c9cc38fbfe2729475973a948c8
  #include <linux/sh_intc.h>
  #include <linux/sh_timer.h>
  #include <linux/pm_domain.h>
++#include <linux/dma-mapping.h>
  #include <mach/hardware.h>
  #include <mach/sh7372.h>
 +#include <mach/common.h>
 +#include <asm/mach/map.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc sh7372_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
 +      },
 +};
 +
 +void __init sh7372_map_io(void)
 +{
 +      iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
++
++      /*
++       * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
++       * enough to allocate the frame buffer memory.
++       */
++      init_consistent_dma_size(12 << 20);
 +}
  
  /* SCIFA0 */
  static struct plat_sci_port scif0_platform_data = {
@@@ -1065,20 -1045,8 +1072,20 @@@ void __init sh7372_add_standard_devices
        sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device);
  }
  
 +static void __init sh7372_earlytimer_init(void)
 +{
 +      sh7372_clock_init();
 +      shmobile_earlytimer_init();
 +}
 +
  void __init sh7372_add_early_devices(void)
  {
        early_platform_add_devices(sh7372_early_devices,
                                   ARRAY_SIZE(sh7372_early_devices));
 +
 +      /* setup early console here as well */
 +      shmobile_setup_console();
 +
 +      /* override timer setup with soc-specific code */
 +      shmobile_timer.init = sh7372_earlytimer_init;
  }
index bcddcdff26f01ff66e4e9ccac9521aa433453b12,0bd21c82151b6db75609c3411cb900184119dd6e..5853989586ed6a2d4687937d38c80381106eea0e
@@@ -33,7 -33,7 +33,7 @@@ static unsigned long pll_recalc(struct 
        return clk->parent->rate * multiplier;
  }
  
 -static struct clk_ops pll_clk_ops = {
 +static struct sh_clk_ops pll_clk_ops = {
        .recalc         = pll_recalc,
  };
  
@@@ -79,7 -79,7 +79,7 @@@ struct clk div4_clks[DIV4_NR] = 
  #define MSTPCR1               0xffc80034
  #define MSTPCR2               0xffc10028
  
- enum { MSTP004, MSTP000, MSTP114, MSTP113, MSTP112,
+ enum { MSTP004, MSTP000, MSTP127, MSTP114, MSTP113, MSTP112,
         MSTP111, MSTP110, MSTP103, MSTP102, MSTP220,
         MSTP_NR };
  
@@@ -89,6 -89,7 +89,7 @@@ static struct clk mstp_clks[MSTP_NR] = 
        [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0),
  
        /* MSTPCR1 */
+       [MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 27, 0),
        [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0),
        [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0),
        [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0),
@@@ -131,6 -132,7 +132,7 @@@ static struct clk_lookup lookups[] = 
        CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]),
        CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]),
        CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]),
+       CLKDEV_CON_ID("rspi2", &mstp_clks[MSTP127]),
  };
  
  int __init arch_clk_init(void)
index bf34ccfb63f1f9ec0631aa76346b468a96256826,2b314439d359a30227357bb137771390c126990e..ab1c58f2d101172b6f769d48278795d6e26adbda
@@@ -36,7 -36,7 +36,7 @@@ static unsigned long pll_recalc(struct 
        return clk->parent->rate * multiplier;
  }
  
 -static struct clk_ops pll_clk_ops = {
 +static struct sh_clk_ops pll_clk_ops = {
        .recalc         = pll_recalc,
  };
  
@@@ -156,7 -156,7 +156,7 @@@ static struct clk_lookup lookups[] = 
        CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
        CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
        CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
-       CLKDEV_CON_ID("ubc_fck", &mstp_clks[MSTP117]),
+       CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP117]),
        CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
        CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
        CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]),
This page took 0.038965 seconds and 5 git commands to generate.