aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 11:56:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 11:56:55 -0400
commit4d26aa305414dbb33b3c32fb205b68004cda8ffc (patch)
tree78da855745406afc870ea3454e584907f7cccb73 /arch/arm/mach-ux500
parent600fe9751aeb6f6b72de84076a05c5b8c04152c0 (diff)
parente74fc973b6e531fef1fce8b101ffff05ecfb774c (diff)
Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC non-critical fixes from Olof Johansson: "Here is a collection of fixes (and some intermixed cleanups) that were considered less important and thus not included in the later parts of the 3.9-rc cycle. It's a bit all over the map, contents wise. A series of ux500 fixes and cleanups, a bunch of various fixes for OMAP and tegra, and some for Freescale i.MX and even Qualcomm MSM. Note that there's also a patch on this branch to globally turn off -Wmaybe-uninitialized when building with -Os. It's been posted several times by Arnd and no dissent was raised, but nobody seemed interested to pick it up. So here it is, as the topmost patch." * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) Turn off -Wmaybe-uninitialized when building with -Os ARM: orion5x: include linux/cpu.h ARM: tegra: call cpu_do_idle from C code ARM: u300: fix ages old copy/paste bug ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7 ARM: tegra: solve adr range issue with THUMB2_KERNEL enabled ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled ARM: tegra: fix build error when THUMB2_KERNEL enabled ARM: msm: Fix uncompess.h tx underrun check ARM: vexpress: Remove A9 PMU compatible values for non-A9 platforms ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS" ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD" ARM: mach-imx: mach-imx6q: Fix sparse warnings ARM: mach-imx: src: Include "common.h ARM: mach-imx: gpc: Include "common.h" ARM: mach-imx: avic: Staticize *avic_base ARM: mach-imx: tzic: Staticize *tzic_base ARM: mach-imx: clk: Include "clk.h" ARM: mach-imx: clk-busy: Staticize clk_busy_mux_ops ...
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c14
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h1
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c51
-rw-r--r--arch/arm/mach-ux500/board-mop500.c45
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c1
5 files changed, 61 insertions, 51 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index ff3c9f016591..33c353bc1c4a 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -30,6 +30,20 @@ struct regulator_init_data gpio_en_3v3_regulator = {
30 .consumer_supplies = gpio_en_3v3_consumers, 30 .consumer_supplies = gpio_en_3v3_consumers,
31}; 31};
32 32
33static struct regulator_consumer_supply sdi0_reg_consumers[] = {
34 REGULATOR_SUPPLY("vqmmc", "sdi0"),
35};
36
37struct regulator_init_data sdi0_reg_init_data = {
38 .constraints = {
39 .min_uV = 1800000,
40 .max_uV = 2900000,
41 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE|REGULATOR_CHANGE_STATUS,
42 },
43 .num_consumer_supplies = ARRAY_SIZE(sdi0_reg_consumers),
44 .consumer_supplies = sdi0_reg_consumers,
45};
46
33/* 47/*
34 * TPS61052 regulator 48 * TPS61052 regulator
35 */ 49 */
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index 9bece38fe933..039f5132c370 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -18,6 +18,7 @@ extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data;
18extern struct ab8500_regulator_platform_data ab8505_regulator_plat_data; 18extern struct ab8500_regulator_platform_data ab8505_regulator_plat_data;
19extern struct regulator_init_data tps61052_regulator; 19extern struct regulator_init_data tps61052_regulator;
20extern struct regulator_init_data gpio_en_3v3_regulator; 20extern struct regulator_init_data gpio_en_3v3_regulator;
21extern struct regulator_init_data sdi0_reg_init_data;
21 22
22void mop500_regulator_init(void); 23void mop500_regulator_init(void);
23 24
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 7f2cb6c5e2c1..6db0740128de 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -31,35 +31,6 @@
31 * SDI 0 (MicroSD slot) 31 * SDI 0 (MicroSD slot)
32 */ 32 */
33 33
34/* GPIO pins used by the sdi0 level shifter */
35static int sdi0_en = -1;
36static int sdi0_vsel = -1;
37
38static int mop500_sdi0_ios_handler(struct device *dev, struct mmc_ios *ios)
39{
40 switch (ios->power_mode) {
41 case MMC_POWER_UP:
42 case MMC_POWER_ON:
43 /*
44 * Level shifter voltage should depend on vdd to when deciding
45 * on either 1.8V or 2.9V. Once the decision has been made the
46 * level shifter must be disabled and re-enabled with a changed
47 * select signal in order to switch the voltage. Since there is
48 * no framework support yet for indicating 1.8V in vdd, use the
49 * default 2.9V.
50 */
51 gpio_direction_output(sdi0_vsel, 0);
52 gpio_direction_output(sdi0_en, 1);
53 break;
54 case MMC_POWER_OFF:
55 gpio_direction_output(sdi0_vsel, 0);
56 gpio_direction_output(sdi0_en, 0);
57 break;
58 }
59
60 return 0;
61}
62
63#ifdef CONFIG_STE_DMA40 34#ifdef CONFIG_STE_DMA40
64struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { 35struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
65 .mode = STEDMA40_MODE_LOGICAL, 36 .mode = STEDMA40_MODE_LOGICAL,
@@ -100,22 +71,6 @@ struct mmci_platform_data mop500_sdi0_data = {
100 71
101static void sdi0_configure(struct device *parent) 72static void sdi0_configure(struct device *parent)
102{ 73{
103 int ret;
104
105 ret = gpio_request(sdi0_en, "level shifter enable");
106 if (!ret)
107 ret = gpio_request(sdi0_vsel,
108 "level shifter 1v8-3v select");
109
110 if (ret) {
111 pr_warning("unable to config sdi0 gpios for level shifter.\n");
112 return;
113 }
114
115 /* Select the default 2.9V and enable level shifter */
116 gpio_direction_output(sdi0_vsel, 0);
117 gpio_direction_output(sdi0_en, 1);
118
119 /* Add the device, force v2 to subrevision 1 */ 74 /* Add the device, force v2 to subrevision 1 */
120 db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID); 75 db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
121} 76}
@@ -123,8 +78,6 @@ static void sdi0_configure(struct device *parent)
123void mop500_sdi_tc35892_init(struct device *parent) 78void mop500_sdi_tc35892_init(struct device *parent)
124{ 79{
125 mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD; 80 mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD;
126 sdi0_en = GPIO_SDMMC_EN;
127 sdi0_vsel = GPIO_SDMMC_1V8_3V_SEL;
128 sdi0_configure(parent); 81 sdi0_configure(parent);
129} 82}
130 83
@@ -263,8 +216,6 @@ void __init snowball_sdi_init(struct device *parent)
263 /* External Micro SD slot */ 216 /* External Micro SD slot */
264 mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; 217 mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
265 mop500_sdi0_data.cd_invert = true; 218 mop500_sdi0_data.cd_invert = true;
266 sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
267 sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO;
268 sdi0_configure(parent); 219 sdi0_configure(parent);
269} 220}
270 221
@@ -276,8 +227,6 @@ void __init hrefv60_sdi_init(struct device *parent)
276 db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); 227 db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
277 /* External Micro SD slot */ 228 /* External Micro SD slot */
278 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; 229 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
279 sdi0_en = HREFV60_SDMMC_EN_GPIO;
280 sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
281 sdi0_configure(parent); 230 sdi0_configure(parent);
282 /* WLAN SDIO channel */ 231 /* WLAN SDIO channel */
283 db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID); 232 db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index ce672378a830..574916b70b2e 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -25,6 +25,8 @@
25#include <linux/mfd/abx500/ab8500.h> 25#include <linux/mfd/abx500/ab8500.h>
26#include <linux/regulator/ab8500.h> 26#include <linux/regulator/ab8500.h>
27#include <linux/regulator/fixed.h> 27#include <linux/regulator/fixed.h>
28#include <linux/regulator/driver.h>
29#include <linux/regulator/gpio-regulator.h>
28#include <linux/mfd/tc3589x.h> 30#include <linux/mfd/tc3589x.h>
29#include <linux/mfd/tps6105x.h> 31#include <linux/mfd/tps6105x.h>
30#include <linux/mfd/abx500/ab8500-gpio.h> 32#include <linux/mfd/abx500/ab8500-gpio.h>
@@ -90,6 +92,37 @@ static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
90 }, 92 },
91}; 93};
92 94
95/* Dynamically populated. */
96static struct gpio sdi0_reg_gpios[] = {
97 { 0, GPIOF_OUT_INIT_LOW, "mmci_vsel" },
98};
99
100static struct gpio_regulator_state sdi0_reg_states[] = {
101 { .value = 2900000, .gpios = (0 << 0) },
102 { .value = 1800000, .gpios = (1 << 0) },
103};
104
105static struct gpio_regulator_config sdi0_reg_info = {
106 .supply_name = "ext-mmc-level-shifter",
107 .gpios = sdi0_reg_gpios,
108 .nr_gpios = ARRAY_SIZE(sdi0_reg_gpios),
109 .states = sdi0_reg_states,
110 .nr_states = ARRAY_SIZE(sdi0_reg_states),
111 .type = REGULATOR_VOLTAGE,
112 .enable_high = 1,
113 .enabled_at_boot = 0,
114 .init_data = &sdi0_reg_init_data,
115 .startup_delay = 100,
116};
117
118static struct platform_device sdi0_regulator = {
119 .name = "gpio-regulator",
120 .id = -1,
121 .dev = {
122 .platform_data = &sdi0_reg_info,
123 },
124};
125
93static struct abx500_gpio_platform_data ab8500_gpio_pdata = { 126static struct abx500_gpio_platform_data ab8500_gpio_pdata = {
94 .gpio_base = MOP500_AB8500_PIN_GPIO(1), 127 .gpio_base = MOP500_AB8500_PIN_GPIO(1),
95}; 128};
@@ -488,6 +521,7 @@ static struct hash_platform_data u8500_hash1_platform_data = {
488/* add any platform devices here - TODO */ 521/* add any platform devices here - TODO */
489static struct platform_device *mop500_platform_devs[] __initdata = { 522static struct platform_device *mop500_platform_devs[] __initdata = {
490 &mop500_gpio_keys_device, 523 &mop500_gpio_keys_device,
524 &sdi0_regulator,
491}; 525};
492 526
493#ifdef CONFIG_STE_DMA40 527#ifdef CONFIG_STE_DMA40
@@ -631,6 +665,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
631 &snowball_gpio_en_3v3_regulator_dev, 665 &snowball_gpio_en_3v3_regulator_dev,
632 &u8500_thsens_device, 666 &u8500_thsens_device,
633 &u8500_cpufreq_cooling_device, 667 &u8500_cpufreq_cooling_device,
668 &sdi0_regulator,
634}; 669};
635 670
636static void __init mop500_init_machine(void) 671static void __init mop500_init_machine(void)
@@ -642,6 +677,9 @@ static void __init mop500_init_machine(void)
642 platform_device_register(&db8500_prcmu_device); 677 platform_device_register(&db8500_prcmu_device);
643 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 678 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
644 679
680 sdi0_reg_info.enable_gpio = GPIO_SDMMC_EN;
681 sdi0_reg_info.gpios[0].gpio = GPIO_SDMMC_1V8_3V_SEL;
682
645 mop500_pinmaps_init(); 683 mop500_pinmaps_init();
646 parent = u8500_init_devices(&ab8500_platdata); 684 parent = u8500_init_devices(&ab8500_platdata);
647 685
@@ -675,6 +713,10 @@ static void __init snowball_init_machine(void)
675 int i; 713 int i;
676 714
677 platform_device_register(&db8500_prcmu_device); 715 platform_device_register(&db8500_prcmu_device);
716
717 sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO;
718 sdi0_reg_info.gpios[0].gpio = SNOWBALL_SDMMC_1V8_3V_GPIO;
719
678 snowball_pinmaps_init(); 720 snowball_pinmaps_init();
679 parent = u8500_init_devices(&ab8500_platdata); 721 parent = u8500_init_devices(&ab8500_platdata);
680 722
@@ -710,6 +752,9 @@ static void __init hrefv60_init_machine(void)
710 */ 752 */
711 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; 753 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
712 754
755 sdi0_reg_info.enable_gpio = HREFV60_SDMMC_EN_GPIO;
756 sdi0_reg_info.gpios[0].gpio = HREFV60_SDMMC_1V8_3V_GPIO;
757
713 hrefv60_pinmaps_init(); 758 hrefv60_pinmaps_init();
714 parent = u8500_init_devices(&ab8500_platdata); 759 parent = u8500_init_devices(&ab8500_platdata);
715 760
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index f1a581844372..5c6c2e633868 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -282,6 +282,7 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
282 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 282 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
283 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", 283 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
284 &db8500_prcmu_pdata), 284 &db8500_prcmu_pdata),
285 OF_DEV_AUXDATA("smsc,lan9115", 0x50000000, "smsc911x", NULL),
285 /* Requires device name bindings. */ 286 /* Requires device name bindings. */
286 OF_DEV_AUXDATA("stericsson,nmk-pinctrl", U8500_PRCMU_BASE, 287 OF_DEV_AUXDATA("stericsson,nmk-pinctrl", U8500_PRCMU_BASE,
287 "pinctrl-db8500", NULL), 288 "pinctrl-db8500", NULL),