Merge branch 'ux500-fixes-20120301' of git://git.kernel.org/pub/scm/linux/kernel...
authorArnd Bergmann <arnd@arndb.de>
Tue, 6 Mar 2012 15:42:54 +0000 (15:42 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 6 Mar 2012 15:42:54 +0000 (15:42 +0000)
* 'ux500-fixes-20120301' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: solve some Kconfig mess
  ARM: ux500: delete TPS6105X selection
  ARM: ux500: select CPU_FREQ_TABLE where needed
  ARM: ux500: select L2X0 cache on ux500
  ARM: ux500: add board autoselection
  ARM: ux500: U8500 depends on MMU
  ARM: ux500: included linux/gpio.h twice
  ARM: ux500: fix around AB8500 GPIO macro name
  ARM: ux500: set ARCH_NR_GPIO to 355 on U8500 platforms
  ARM: ux500: Add audio-regulators
  ARM: ux500: Add DMA-channels for MSP
  ARM: ux500: Add placeholder for clk_set_parent

12 files changed:
arch/arm/Kconfig
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500-regulators.c
arch/arm/mach-ux500/board-mop500-u8500uib.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/clock.h
arch/arm/mach-ux500/devices-db8500.c
arch/arm/mach-ux500/include/mach/hardware.h
arch/arm/mach-ux500/include/mach/irqs.h

index a48aecc..e575b60 100644 (file)
@@ -901,6 +901,7 @@ config ARCH_U300
 
 config ARCH_U8500
        bool "ST-Ericsson U8500 Series"
+       depends on MMU
        select CPU_V7
        select ARM_AMBA
        select GENERIC_CLOCKEVENTS
@@ -1577,7 +1578,7 @@ config LOCAL_TIMERS
 config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-       default 350 if ARCH_U8500
+       default 355 if ARCH_U8500
        default 0
        help
          Maximum number of GPIOs in the system.
index 52af004..d205de4 100644 (file)
@@ -8,47 +8,55 @@ config UX500_SOC_COMMON
        select ARM_ERRATA_753970
        select ARM_ERRATA_754322
        select ARM_ERRATA_764369
-
-menu "Ux500 SoC"
+       select CACHE_L2X0
 
 config UX500_SOC_DB5500
-       bool "DB5500"
+       bool
        select MFD_DB5500_PRCMU
 
 config UX500_SOC_DB8500
-       bool "DB8500"
+       bool
        select MFD_DB8500_PRCMU
        select REGULATOR_DB8500_PRCMU
-
-endmenu
+       select CPU_FREQ_TABLE if CPU_FREQ
 
 menu "Ux500 target platform (boards)"
 
-config MACH_U8500
-       bool "U8500 Development platform"
-       depends on UX500_SOC_DB8500
-       select TPS6105X
+config MACH_MOP500
+       bool "U8500 Development platform, MOP500 versions"
+       select UX500_SOC_DB8500
+       select I2C
+       select I2C_NOMADIK
        help
-         Include support for the mop500 development platform.
+         Include support for the MOP500 development platform.
 
 config MACH_HREFV60
-       bool "U85000 Development platform, HREFv60 version"
-       depends on UX500_SOC_DB8500
-       help
-         Include support for the HREFv60 new development platform.
+       bool "U8500 Development platform, HREFv60 version"
+       select MACH_MOP500
+       help
+         Include support for the HREFv60 new development platform.
+         Includes HREFv70, v71 etc.
 
 config MACH_SNOWBALL
        bool "U8500 Snowball platform"
-       depends on UX500_SOC_DB8500
-       select MACH_U8500
+       select MACH_MOP500
        help
          Include support for the snowball development platform.
 
 config MACH_U5500
        bool "U5500 Development platform"
-       depends on UX500_SOC_DB5500
+       select UX500_SOC_DB5500
        help
          Include support for the U5500 development platform.
+
+config UX500_AUTO_PLATFORM
+       def_bool y
+       depends on !MACH_U5500
+       select MACH_MOP500
+       help
+         At least one platform needs to be selected in order to build
+         a working kernel. If everything else is disabled, this
+         automatically enables MACH_MOP500.
 endmenu
 
 config UX500_DEBUG_UART
index 6bd2f45..8dd75f2 100644 (file)
@@ -7,7 +7,7 @@ obj-y                           := clock.o cpu.o devices.o devices-common.o \
 obj-$(CONFIG_CACHE_L2X0)       += cache-l2x0.o
 obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
-obj-$(CONFIG_MACH_U8500)       += board-mop500.o board-mop500-sdi.o \
+obj-$(CONFIG_MACH_MOP500)      += board-mop500.o board-mop500-sdi.o \
                                board-mop500-regulators.o \
                                board-mop500-uib.o board-mop500-stuib.o \
                                board-mop500-u8500uib.o \
index 2735d03..52426a4 100644 (file)
@@ -74,6 +74,26 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
        REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
 };
 
+static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
+       /* AB8500 audio-codec main supply */
+       REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
+       /* AB8500 audio-codec Mic1 supply */
+       REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
+       /* AB8500 audio-codec Mic2 supply */
+       REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
+       /* AB8500 audio-codec DMic supply */
+       REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
+};
+
 static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
        /* SoC core supply, no device */
        REGULATOR_SUPPLY("v-intcore", NULL),
@@ -323,6 +343,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AUD",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
+               .consumer_supplies = ab8500_vaud_consumers,
        },
        /* supply for v-anamic1 VAMic1-LDO */
        [AB8500_LDO_ANAMIC1] = {
@@ -330,6 +352,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AMIC1",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
+               .consumer_supplies = ab8500_vamic1_consumers,
        },
        /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
        [AB8500_LDO_ANAMIC2] = {
@@ -337,6 +361,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AMIC2",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
+               .consumer_supplies = ab8500_vamic2_consumers,
        },
        /* supply for v-dmic, VDMIC LDO */
        [AB8500_LDO_DMIC] = {
@@ -344,6 +370,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-DMIC",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
+               .consumer_supplies = ab8500_vdmic_consumers,
        },
        /* supply for v-intcore12, VINTCORE12 LDO */
        [AB8500_LDO_INTCORE] = {
index feb5744..ead91c9 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/tc3589x.h>
 #include <linux/input/matrix_keypad.h>
index 5c00712..6d672a5 100644 (file)
@@ -72,7 +72,7 @@ static struct platform_device snowball_led_dev = {
 };
 
 static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
-       .gpio_base              = MOP500_AB8500_GPIO(0),
+       .gpio_base              = MOP500_AB8500_PIN_GPIO(1),
        .irq_base               = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
        /* config_reg is the initial configuration of ab8500 pins.
         * The pins can be configured as GPIO or alt functions based
index f926d3d..7ff6cbf 100644 (file)
@@ -63,7 +63,7 @@
  * because the AB8500 GPIO pins are enumbered starting from 1, so the value in
  * parens matches the GPIO pin number in the data sheet.
  */
-#define MOP500_AB8500_GPIO(x)          (MOP500_EGPIO_END + (x) - 1)
+#define MOP500_AB8500_PIN_GPIO(x)      (MOP500_EGPIO_END + (x) - 1)
 /*Snowball AB8500 GPIO */
 #define SNOWBALL_VSMPS2_1V8_GPIO       MOP500_AB8500_PIN_GPIO(1)       /* SYSCLKREQ2/GPIO1 */
 #define SNOWBALL_PM_GPIO1_GPIO         MOP500_AB8500_PIN_GPIO(2)       /* SYSCLKREQ3/GPIO2 */
index 7379075..ec35f0a 100644 (file)
@@ -223,6 +223,13 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
 }
 EXPORT_SYMBOL(clk_set_rate);
 
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+       /*TODO*/
+       return -ENOSYS;
+}
+EXPORT_SYMBOL(clk_set_parent);
+
 static void clk_prcmu_enable(struct clk *clk)
 {
        void __iomem *cg_set_reg = __io_address(U8500_PRCMU_BASE)
index 0744907..d776ada 100644 (file)
@@ -21,6 +21,7 @@ struct clkops {
        void (*enable) (struct clk *);
        void (*disable) (struct clk *);
        unsigned long (*get_rate) (struct clk *);
+       int (*set_parent)(struct clk *, struct clk *);
 };
 
 /**
index a7c6cdc..6e66d37 100644 (file)
@@ -101,6 +101,9 @@ static const dma_addr_t dma40_tx_map[DB8500_DMA_NR_DEV] = {
        [DB8500_DMA_DEV41_SD_MM3_TX] = -1,
        [DB8500_DMA_DEV42_SD_MM4_TX] = -1,
        [DB8500_DMA_DEV43_SD_MM5_TX] = -1,
+       [DB8500_DMA_DEV14_MSP2_TX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV30_MSP1_TX] = U8500_MSP1_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
 };
 
 /* Mapping between source event lines and physical device address */
@@ -133,6 +136,9 @@ static const dma_addr_t dma40_rx_map[DB8500_DMA_NR_DEV] = {
        [DB8500_DMA_DEV41_SD_MM3_RX] = -1,
        [DB8500_DMA_DEV42_SD_MM4_RX] = -1,
        [DB8500_DMA_DEV43_SD_MM5_RX] = -1,
+       [DB8500_DMA_DEV14_MSP2_RX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV30_MSP3_RX] = U8500_MSP3_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
 };
 
 /* Reserved event lines for memcpy only */
index b6ba26a..d93d6db 100644 (file)
@@ -30,6 +30,8 @@
 #include <mach/db8500-regs.h>
 #include <mach/db5500-regs.h>
 
+#define MSP_TX_RX_REG_OFFSET   0
+
 #ifndef __ASSEMBLY__
 
 #include <mach/id.h>
index 9db68d2..c23a6b5 100644 (file)
@@ -43,7 +43,7 @@
 /* This will be overridden by board-specific irq headers */
 #define IRQ_BOARD_END          IRQ_BOARD_START
 
-#ifdef CONFIG_MACH_U8500
+#ifdef CONFIG_MACH_MOP500
 #include <mach/irqs-board-mop500.h>
 #endif