Merge branches 'sh/urgent' and 'sh/regulator' into sh-latest
authorPaul Mundt <lethal@linux-sh.org>
Wed, 25 Jul 2012 04:13:09 +0000 (13:13 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 25 Jul 2012 04:13:09 +0000 (13:13 +0900)
1  2 
arch/sh/boards/Kconfig
arch/sh/boards/board-polaris.c
arch/sh/boards/mach-kfr2r09/setup.c

diff --combined arch/sh/boards/Kconfig
index 7048c03490d9a06d48cff04ed6821db9a76e08d4,6047f94369905a5f99827c31eb325ea33ece6098..fb5805745ace8160ea5074b68a51347903f6f5b0
@@@ -44,8 -44,6 +44,8 @@@ config SH_7721_SOLUTION_ENGIN
  config SH_7722_SOLUTION_ENGINE
        bool "SolutionEngine7722"
        select SOLUTION_ENGINE
 +      select GENERIC_IRQ_CHIP
 +      select IRQ_DOMAIN
        depends on CPU_SUBTYPE_SH7722
        help
          Select 7722 SolutionEngine if configuring for a Hitachi SH772
@@@ -57,6 -55,7 +57,7 @@@ config SH_7724_SOLUTION_ENGIN
        depends on CPU_SUBTYPE_SH7724
        select ARCH_REQUIRE_GPIOLIB
        select SND_SOC_AK4642 if SND_SIMPLE_CARD
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Select 7724 SolutionEngine if configuring for a Hitachi SH7724
          evaluation board.
@@@ -82,8 -81,6 +83,8 @@@ config SH_7780_SOLUTION_ENGIN
  config SH_7343_SOLUTION_ENGINE
        bool "SolutionEngine7343"
        select SOLUTION_ENGINE
 +      select GENERIC_IRQ_CHIP
 +      select IRQ_DOMAIN
        depends on CPU_SUBTYPE_SH7343
        help
          Select 7343 SolutionEngine if configuring for a Hitachi
@@@ -140,6 -137,7 +141,7 @@@ config SH_RS
        bool "Renesas Starter Kit"
        depends on CPU_SUBTYPE_SH7201 || CPU_SUBTYPE_SH7203 || \
          CPU_SUBTYPE_SH7264 || CPU_SUBTYPE_SH7269
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
         Select this option if configuring for any of the RSK+ MCU
         evaluation platforms.
@@@ -159,6 -157,7 +161,7 @@@ config SH_SDK778
        select NO_IOPORT if !PCI
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select HAVE_SRAM_POOL
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Select SDK7786 if configuring for a Renesas Technology Europe
          SH7786-65nm board.
@@@ -173,6 -172,7 +176,7 @@@ config SH_SH7757LC
        bool "SH7757LCR"
        depends on CPU_SUBTYPE_SH7757
        select ARCH_REQUIRE_GPIOLIB
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
  
  config SH_SH7785LCR
        bool "SH7785LCR"
@@@ -206,6 -206,7 +210,7 @@@ config SH_MIGO
        bool "Migo-R"
        depends on CPU_SUBTYPE_SH7722
        select ARCH_REQUIRE_GPIOLIB
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Select Migo-R if configuring for the SH7722 Migo-R platform
            by Renesas System Solutions Asia Pte. Ltd.
@@@ -214,6 -215,7 +219,7 @@@ config SH_AP325RX
        bool "AP-325RXA"
        depends on CPU_SUBTYPE_SH7723
        select ARCH_REQUIRE_GPIOLIB
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Renesas "AP-325RXA" support.
          Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
@@@ -222,6 -224,7 +228,7 @@@ config SH_KFR2R0
        bool "KFR2R09"
        depends on CPU_SUBTYPE_SH7724
        select ARCH_REQUIRE_GPIOLIB
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          "Kit For R2R for 2009" support.
  
@@@ -230,6 -233,7 +237,7 @@@ config SH_ECOVE
        depends on CPU_SUBTYPE_SH7724
        select ARCH_REQUIRE_GPIOLIB
        select SND_SOC_DA7210 if SND_SIMPLE_CARD
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Renesas "R0P7724LC0011/21RL (EcoVec)" support.
  
@@@ -299,12 -303,12 +307,13 @@@ config SH_X3PROT
        bool "SH-X3 Prototype board"
        depends on CPU_SUBTYPE_SHX3
        select NO_IOPORT if !PCI
 +      select IRQ_DOMAIN
  
  config SH_MAGIC_PANEL_R2
        bool "Magic Panel R2"
        depends on CPU_SUBTYPE_SH7720
        select ARCH_REQUIRE_GPIOLIB
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        help
          Select Magic Panel R2 if configuring for Magic Panel R2.
  
@@@ -316,6 -320,7 +325,7 @@@ config SH_CAYMA
  config SH_POLARIS
        bool "SMSC Polaris"
        select CPU_HAS_IPR_IRQ
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        depends on CPU_SUBTYPE_SH7709
        help
          Select if configuring for an SMSC Polaris development board
  config SH_SH2007
        bool "SH-2007 board"
        select NO_IOPORT
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        depends on CPU_SUBTYPE_SH7780
        help
          SH-2007 is a single-board computer based around SH7780 chip
  config SH_APSH4A3A
        bool "AP-SH4A-3A"
        select SH_ALPHA_BOARD
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        depends on CPU_SUBTYPE_SH7785
        help
          Select AP-SH4A-3A if configuring for an ALPHAPROJECT AP-SH4A-3A.
@@@ -342,6 -349,7 +354,7 @@@ config SH_APSH4AD0
        bool "AP-SH4AD-0A"
        select SH_ALPHA_BOARD
        select SYS_SUPPORTS_PCI
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
        depends on CPU_SUBTYPE_SH7786
        help
          Select AP-SH4AD-0A if configuring for an ALPHAPROJECT AP-SH4AD-0A.
index 0978ae2e484724d74719c897a63df706fde4caba,758f432e06508a59b57d340522b2f123ebc04de4..37a08d0947278ea65c4741dbf072420aca9cb883
@@@ -1,5 -1,5 +1,5 @@@
  /*
 - * June 2006 steve.glendinning@smsc.com
 + * June 2006 Steve Glendinning <steve.glendinning@shawell.net>
   *
   * Polaris-specific resource declaration
   *
@@@ -9,6 -9,8 +9,8 @@@
  #include <linux/interrupt.h>
  #include <linux/irq.h>
  #include <linux/platform_device.h>
+ #include <linux/regulator/fixed.h>
+ #include <linux/regulator/machine.h>
  #include <linux/smsc911x.h>
  #include <linux/io.h>
  #include <asm/irq.h>
  #define AREA5_WAIT_CTRL       (0x1C00)
  #define WAIT_STATES_10        (0x7)
  
+ /* Dummy supplies, where voltage doesn't matter */
+ static struct regulator_consumer_supply dummy_supplies[] = {
+       REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+       REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+ };
  static struct resource smsc911x_resources[] = {
        [0] = {
                .name           = "smsc911x-memory",
@@@ -88,6 -96,8 +96,8 @@@ static int __init polaris_initialise(vo
  
        printk(KERN_INFO "Configuring Polaris external bus\n");
  
+       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
        /* Configure area 5 with 2 wait states */
        wcr = __raw_readw(WCR2);
        wcr &= (~AREA5_WAIT_CTRL);
index 43a179ce9afcb0bdcabc8f116901e27b7d4c02eb,9dff4fffaf5237491897d474b33f145682ad1760..f2a4304fbe2321996fb875b75d2bd570feda8ae6
@@@ -21,6 -21,8 +21,8 @@@
  #include <linux/input.h>
  #include <linux/input/sh_keysc.h>
  #include <linux/i2c.h>
+ #include <linux/regulator/fixed.h>
+ #include <linux/regulator/machine.h>
  #include <linux/usb/r8a66597.h>
  #include <linux/videodev2.h>
  #include <linux/sh_intc.h>
@@@ -201,8 -203,8 +203,8 @@@ static struct resource kfr2r09_usb0_gad
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
 -              .start  = evtirq(0xa20),
 -              .end    = evtirq(0xa20),
 +              .start  = evt2irq(0xa20),
 +              .end    = evt2irq(0xa20),
                .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
        },
  };
@@@ -341,6 -343,13 +343,13 @@@ static struct platform_device kfr2r09_c
        },
  };
  
+ /* Fixed 3.3V regulator to be used by SDHI0 */
+ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
+ {
+       REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
+       REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
+ };
  static struct resource kfr2r09_sh_sdhi0_resources[] = {
        [0] = {
                .name   = "SDHI0",
@@@ -523,6 -532,9 +532,9 @@@ static int __init kfr2r09_devices_setup
                                        &kfr2r09_sdram_leave_start,
                                        &kfr2r09_sdram_leave_end);
  
+       regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
+                                    ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
        /* enable SCIF1 serial port for YC401 console support */
        gpio_request(GPIO_FN_SCIF1_RXD, NULL);
        gpio_request(GPIO_FN_SCIF1_TXD, NULL);