Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Dec 2009 03:03:16 +0000 (19:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Dec 2009 03:03:16 +0000 (19:03 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (137 commits)
  sh: include empty zero page in romImage
  sh: Make associative cache writes fatal on all SH-4A parts.
  sh: Drop associative writes for SH-4 cache flushes.
  sh: Partial revert of copy/clear_user_highpage() optimizations.
  sh: Add default uImage rule for se7724, ap325rxa, and migor.
  sh: allow runtime pm without suspend/resume callbacks
  sh: mach-ecovec24: Remove un-defined settings for VPU
  sh: mach-ecovec24: LCDC drive ability become high
  sh: fix sh7724 VEU3F resource size
  serial: sh-sci: Fix too early port disabling.
  sh: pfc: pr_info() -> pr_debug() cleanups.
  sh: pfc: Convert from ctrl_xxx() to __raw_xxx() I/O routines.
  sh: Improve kfr2r09 serial port setup code
  sh: Break out SuperH PFC code
  sh: Move KEYSC header file
  sh: convert /proc/cpu/aligmnent, /proc/cpu/kernel_alignment to seq_file
  sh: Add CPG save/restore code for sh7724 R-standby
  sh: Add SDHI power control support to Ecovec
  mfd: Add power control platform data to SDHI driver
  sh: mach-ecovec24: modify address map
  ...

1  2 
arch/sh/boards/mach-se/7724/setup.c
drivers/mfd/Kconfig
drivers/mfd/Makefile
drivers/serial/Kconfig

index 0894bba9fadef0e1c33f738149aafc015a9828a8,da01fc0dc88138ce29659593fc757ebc4099d9d5..4b0f0c0dc2b858ff1c3d9e447d8f4944e79d1c3e
@@@ -19,6 -19,7 +19,7 @@@
  #include <linux/smc91x.h>
  #include <linux/gpio.h>
  #include <linux/input.h>
+ #include <linux/input/sh_keysc.h>
  #include <linux/usb/r8a66597.h>
  #include <video/sh_mobile_lcdc.h>
  #include <media/sh_mobile_ceu.h>
@@@ -27,7 -28,7 +28,7 @@@
  #include <asm/heartbeat.h>
  #include <asm/sh_eth.h>
  #include <asm/clock.h>
- #include <asm/sh_keysc.h>
+ #include <asm/suspend.h>
  #include <cpu/sh7724.h>
  #include <mach-se/mach/se7724.h>
  
@@@ -313,9 -314,6 +314,9 @@@ static struct platform_device fsi_devic
        .dev    = {
                .platform_data  = &fsi_info,
        },
 +      .archdata = {
 +              .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
 +      },
  };
  
  /* KEYSC in SoC (Needs SW33-2 set to ON) */
@@@ -451,6 -449,52 +452,52 @@@ static struct platform_device sh7724_us
        .resource       = sh7724_usb1_gadget_resources,
  };
  
+ static struct resource sdhi0_cn7_resources[] = {
+       [0] = {
+               .name   = "SDHI0",
+               .start  = 0x04ce0000,
+               .end    = 0x04ce01ff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = 101,
+               .flags  = IORESOURCE_IRQ,
+       },
+ };
+ static struct platform_device sdhi0_cn7_device = {
+       .name           = "sh_mobile_sdhi",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(sdhi0_cn7_resources),
+       .resource       = sdhi0_cn7_resources,
+       .archdata = {
+               .hwblk_id = HWBLK_SDHI0,
+       },
+ };
+ static struct resource sdhi1_cn8_resources[] = {
+       [0] = {
+               .name   = "SDHI1",
+               .start  = 0x04cf0000,
+               .end    = 0x04cf01ff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = 24,
+               .flags  = IORESOURCE_IRQ,
+       },
+ };
+ static struct platform_device sdhi1_cn8_device = {
+       .name           = "sh_mobile_sdhi",
+       .id             = 1,
+       .num_resources  = ARRAY_SIZE(sdhi1_cn8_resources),
+       .resource       = sdhi1_cn8_resources,
+       .archdata = {
+               .hwblk_id = HWBLK_SDHI1,
+       },
+ };
  static struct platform_device *ms7724se_devices[] __initdata = {
        &heartbeat_device,
        &smc91x_eth_device,
        &sh7724_usb0_host_device,
        &sh7724_usb1_gadget_device,
        &fsi_device,
+       &sdhi0_cn7_device,
+       &sdhi1_cn8_device,
  };
  
  #define EEPROM_OP   0xBA206000
@@@ -487,7 -533,7 +536,7 @@@ static int __init sh_eth_is_eeprom_read
  static void __init sh_eth_init(void)
  {
        int i;
-       u16 mac[3];
+       u16 mac;
  
        /* check EEPROM status */
        if (!sh_eth_is_eeprom_ready())
                if (!sh_eth_is_eeprom_ready())
                        return;
  
-               mac[i] = ctrl_inw(EEPROM_DATA);
-               mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */
+               mac = ctrl_inw(EEPROM_DATA);
+               sh_eth_plat.mac_addr[i << 1] = mac & 0xff;
+               sh_eth_plat.mac_addr[(i << 1) + 1] = mac >> 8;
        }
-       /* reset sh-eth */
-       ctrl_outl(0x1, SH_ETH_ADDR + 0x0);
-       /* set MAC addr */
-       ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR);
-       ctrl_outl((mac[2]), SH_ETH_MALR);
  }
  
  #define SW4140    0xBA201000
  #define SW41_G    0x4000
  #define SW41_H    0x8000
  
+ extern char ms7724se_sdram_enter_start;
+ extern char ms7724se_sdram_enter_end;
+ extern char ms7724se_sdram_leave_start;
+ extern char ms7724se_sdram_leave_end;
  static int __init devices_setup(void)
  {
        u16 sw = ctrl_inw(SW4140); /* select camera, monitor */
        struct clk *fsia_clk;
  
+       /* register board specific self-refresh code */
+       sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
+                                       &ms7724se_sdram_enter_start,
+                                       &ms7724se_sdram_enter_end,
+                                       &ms7724se_sdram_leave_start,
+                                       &ms7724se_sdram_leave_end);
        /* Reset Release */
        ctrl_outw(ctrl_inw(FPGA_OUT) &
                  ~((1 << 1)  | /* LAN */
        clk_set_rate(&fsimcka_clk, 11000);
        clk_put(fsia_clk);
  
+       /* SDHI0 connected to cn7 */
+       gpio_request(GPIO_FN_SDHI0CD, NULL);
+       gpio_request(GPIO_FN_SDHI0WP, NULL);
+       gpio_request(GPIO_FN_SDHI0D3, NULL);
+       gpio_request(GPIO_FN_SDHI0D2, NULL);
+       gpio_request(GPIO_FN_SDHI0D1, NULL);
+       gpio_request(GPIO_FN_SDHI0D0, NULL);
+       gpio_request(GPIO_FN_SDHI0CMD, NULL);
+       gpio_request(GPIO_FN_SDHI0CLK, NULL);
+       /* SDHI1 connected to cn8 */
+       gpio_request(GPIO_FN_SDHI1CD, NULL);
+       gpio_request(GPIO_FN_SDHI1WP, NULL);
+       gpio_request(GPIO_FN_SDHI1D3, NULL);
+       gpio_request(GPIO_FN_SDHI1D2, NULL);
+       gpio_request(GPIO_FN_SDHI1D1, NULL);
+       gpio_request(GPIO_FN_SDHI1D0, NULL);
+       gpio_request(GPIO_FN_SDHI1CMD, NULL);
+       gpio_request(GPIO_FN_SDHI1CLK, NULL);
        /*
         * enable SH-Eth
         *
diff --combined drivers/mfd/Kconfig
index 08f2d07bf56aceba27761f707fa737884fb16ad9,96956b3cc178a85f05239574c144d820428fd13b..a296e717e86edbad24c9c34460ae65376c531af4
@@@ -35,6 -35,14 +35,14 @@@ config MFD_ASIC
          This driver supports the ASIC3 multifunction chip found on many
          PDAs (mainly iPAQ and HTC based ones)
  
+ config MFD_SH_MOBILE_SDHI
+       bool "Support for SuperH Mobile SDHI"
+       depends on SUPERH
+       select MFD_CORE
+        ---help---
+         This driver supports the SDHI hardware block found in many
+         SuperH Mobile SoCs.
  config MFD_DM355EVM_MSP
        bool "DaVinci DM355 EVM microcontroller"
        depends on I2C && MACH_DAVINCI_DM355_EVM
@@@ -121,12 -129,6 +129,12 @@@ config TWL4030_POWE
          and load scripts controling which resources are switched off/on
          or reset when a sleep, wakeup or warm reset event occurs.
  
 +config TWL4030_CODEC
 +      bool
 +      depends on TWL4030_CORE
 +      select MFD_CORE
 +      default n
 +
  config MFD_TMIO
        bool
        default n
diff --combined drivers/mfd/Makefile
index af0fc903cec83c0e6d66d1a15950b5531170faf6,d9522943d2fbe8f412ff6b0afe792b13d8b2fe62..11350c1d9301a72296a563daad3fc94e1f52b182
@@@ -4,6 -4,7 +4,7 @@@
  
  obj-$(CONFIG_MFD_SM501)               += sm501.o
  obj-$(CONFIG_MFD_ASIC3)               += asic3.o
+ obj-$(CONFIG_MFD_SH_MOBILE_SDHI)              += sh_mobile_sdhi.o
  
  obj-$(CONFIG_HTC_EGPIO)               += htc-egpio.o
  obj-$(CONFIG_HTC_PASIC3)      += htc-pasic3.o
@@@ -26,7 -27,6 +27,7 @@@ obj-$(CONFIG_MENELAUS)                += menelaus.
  
  obj-$(CONFIG_TWL4030_CORE)    += twl4030-core.o twl4030-irq.o
  obj-$(CONFIG_TWL4030_POWER)    += twl4030-power.o
 +obj-$(CONFIG_TWL4030_CODEC)   += twl4030-codec.o
  
  obj-$(CONFIG_MFD_MC13783)     += mc13783-core.o
  
diff --combined drivers/serial/Kconfig
index 50943ff78f4b47437e7997fa582d57c9ce083b0d,30b58eeb439ff61684138f092a120cd2289a794b..9ff47db0b2ced375c7463a504625cd49f63c925f
@@@ -996,7 -996,7 +996,7 @@@ config SERIAL_IP22_ZILOG_CONSOL
  
  config SERIAL_SH_SCI
        tristate "SuperH SCI(F) serial port support"
-       depends on SUPERH || H8300
+       depends on HAVE_CLK && (SUPERH || H8300)
        select SERIAL_CORE
  
  config SERIAL_SH_SCI_NR_UARTS
@@@ -1477,17 -1477,4 +1477,17 @@@ config SERIAL_BCM63XX_CONSOL
          If you have enabled the serial port on the bcm63xx CPU
          you can make it the console by answering Y to this option.
  
 +config SERIAL_GRLIB_GAISLER_APBUART
 +      tristate "GRLIB APBUART serial support"
 +      depends on OF
 +      ---help---
 +      Add support for the GRLIB APBUART serial port.
 +
 +config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE
 +      bool "Console on GRLIB APBUART serial port"
 +      depends on SERIAL_GRLIB_GAISLER_APBUART=y
 +      select SERIAL_CORE_CONSOLE
 +      help
 +      Support for running a console on the GRLIB APBUART
 +
  endmenu