diff options
-rw-r--r-- | arch/arm/boot/dts/dbx5x0.dtsi | 7 | ||||
-rw-r--r-- | arch/arm/boot/dts/href.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/hrefprev60.dts | 10 | ||||
-rw-r--r-- | arch/arm/boot/dts/snowball.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/stuib.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 1 | ||||
-rw-r--r-- | drivers/clk/ux500/u8500_clk.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 9 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 29 |
13 files changed, 120 insertions, 58 deletions
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 69140ba99f46..d765c38afebf 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
@@ -191,7 +191,7 @@ | |||
191 | 191 | ||
192 | prcmu: prcmu@80157000 { | 192 | prcmu: prcmu@80157000 { |
193 | compatible = "stericsson,db8500-prcmu"; | 193 | compatible = "stericsson,db8500-prcmu"; |
194 | reg = <0x80157000 0x1000>; | 194 | reg = <0x80157000 0x2000>; |
195 | reg-names = "prcmu"; | 195 | reg-names = "prcmu"; |
196 | interrupts = <0 47 0x4>; | 196 | interrupts = <0 47 0x4>; |
197 | #address-cells = <1>; | 197 | #address-cells = <1>; |
@@ -675,10 +675,13 @@ | |||
675 | compatible = "regulator-gpio"; | 675 | compatible = "regulator-gpio"; |
676 | 676 | ||
677 | regulator-min-microvolt = <1800000>; | 677 | regulator-min-microvolt = <1800000>; |
678 | regulator-max-microvolt = <2600000>; | 678 | regulator-max-microvolt = <2900000>; |
679 | regulator-name = "mmci-reg"; | 679 | regulator-name = "mmci-reg"; |
680 | regulator-type = "voltage"; | 680 | regulator-type = "voltage"; |
681 | 681 | ||
682 | startup-delay-us = <100>; | ||
683 | enable-active-high; | ||
684 | |||
682 | states = <1800000 0x1 | 685 | states = <1800000 0x1 |
683 | 2900000 0x0>; | 686 | 2900000 0x0>; |
684 | 687 | ||
diff --git a/arch/arm/boot/dts/href.dtsi b/arch/arm/boot/dts/href.dtsi index 592fb9dc35bd..f2c0f66c4fda 100644 --- a/arch/arm/boot/dts/href.dtsi +++ b/arch/arm/boot/dts/href.dtsi | |||
@@ -87,6 +87,7 @@ | |||
87 | mmc-cap-sd-highspeed; | 87 | mmc-cap-sd-highspeed; |
88 | mmc-cap-mmc-highspeed; | 88 | mmc-cap-mmc-highspeed; |
89 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | 89 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
90 | vqmmc-supply = <&vmmci>; | ||
90 | 91 | ||
91 | cd-gpios = <&tc3589x_gpio 3 0x4>; | 92 | cd-gpios = <&tc3589x_gpio 3 0x4>; |
92 | 93 | ||
diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts index eec29c4a86dc..c2d274815923 100644 --- a/arch/arm/boot/dts/hrefprev60.dts +++ b/arch/arm/boot/dts/hrefprev60.dts | |||
@@ -25,6 +25,14 @@ | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | soc-u9500 { | 27 | soc-u9500 { |
28 | prcmu@80157000 { | ||
29 | ab8500@5 { | ||
30 | ab8500-gpio { | ||
31 | compatible = "stericsson,ab8500-gpio"; | ||
32 | }; | ||
33 | }; | ||
34 | }; | ||
35 | |||
28 | i2c@80004000 { | 36 | i2c@80004000 { |
29 | tps61052@33 { | 37 | tps61052@33 { |
30 | compatible = "tps61052"; | 38 | compatible = "tps61052"; |
@@ -40,7 +48,7 @@ | |||
40 | 48 | ||
41 | vmmci: regulator-gpio { | 49 | vmmci: regulator-gpio { |
42 | gpios = <&tc3589x_gpio 18 0x4>; | 50 | gpios = <&tc3589x_gpio 18 0x4>; |
43 | gpio-enable = <&tc3589x_gpio 17 0x4>; | 51 | enable-gpio = <&tc3589x_gpio 17 0x4>; |
44 | 52 | ||
45 | status = "okay"; | 53 | status = "okay"; |
46 | }; | 54 | }; |
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 27f31a5fa494..b095e85d93c8 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts | |||
@@ -299,6 +299,10 @@ | |||
299 | }; | 299 | }; |
300 | 300 | ||
301 | ab8500@5 { | 301 | ab8500@5 { |
302 | ab8500-gpio { | ||
303 | compatible = "stericsson,ab8500-gpio"; | ||
304 | }; | ||
305 | |||
302 | ab8500-regulators { | 306 | ab8500-regulators { |
303 | ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { | 307 | ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { |
304 | regulator-name = "V-DISPLAY"; | 308 | regulator-name = "V-DISPLAY"; |
diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi index 39446a247e79..615392a75676 100644 --- a/arch/arm/boot/dts/stuib.dtsi +++ b/arch/arm/boot/dts/stuib.dtsi | |||
@@ -15,7 +15,7 @@ | |||
15 | stmpe1601: stmpe1601@40 { | 15 | stmpe1601: stmpe1601@40 { |
16 | compatible = "st,stmpe1601"; | 16 | compatible = "st,stmpe1601"; |
17 | reg = <0x40>; | 17 | reg = <0x40>; |
18 | interrupts = <26 0x1>; | 18 | interrupts = <26 0x2>; |
19 | interrupt-parent = <&gpio6>; | 19 | interrupt-parent = <&gpio6>; |
20 | interrupt-controller; | 20 | interrupt-controller; |
21 | 21 | ||
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 2a17bc506cff..cb7540573a85 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c | |||
@@ -28,6 +28,20 @@ struct regulator_init_data gpio_en_3v3_regulator = { | |||
28 | .consumer_supplies = gpio_en_3v3_consumers, | 28 | .consumer_supplies = gpio_en_3v3_consumers, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static struct regulator_consumer_supply sdi0_reg_consumers[] = { | ||
32 | REGULATOR_SUPPLY("vqmmc", "sdi0"), | ||
33 | }; | ||
34 | |||
35 | struct regulator_init_data sdi0_reg_init_data = { | ||
36 | .constraints = { | ||
37 | .min_uV = 1800000, | ||
38 | .max_uV = 2900000, | ||
39 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE|REGULATOR_CHANGE_STATUS, | ||
40 | }, | ||
41 | .num_consumer_supplies = ARRAY_SIZE(sdi0_reg_consumers), | ||
42 | .consumer_supplies = sdi0_reg_consumers, | ||
43 | }; | ||
44 | |||
31 | /* | 45 | /* |
32 | * TPS61052 regulator | 46 | * TPS61052 regulator |
33 | */ | 47 | */ |
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 78a0642a2206..0c79d902f904 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h | |||
@@ -19,5 +19,6 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS]; | |||
19 | extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; | 19 | extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; |
20 | extern struct regulator_init_data tps61052_regulator; | 20 | extern struct regulator_init_data tps61052_regulator; |
21 | extern struct regulator_init_data gpio_en_3v3_regulator; | 21 | extern struct regulator_init_data gpio_en_3v3_regulator; |
22 | extern struct regulator_init_data sdi0_reg_init_data; | ||
22 | 23 | ||
23 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 051b62c27102..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 */ | ||
35 | static int sdi0_en = -1; | ||
36 | static int sdi0_vsel = -1; | ||
37 | |||
38 | static 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 |
64 | struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { | 35 | struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { |
65 | .mode = STEDMA40_MODE_LOGICAL, | 36 | .mode = STEDMA40_MODE_LOGICAL, |
@@ -81,7 +52,6 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { | |||
81 | #endif | 52 | #endif |
82 | 53 | ||
83 | struct mmci_platform_data mop500_sdi0_data = { | 54 | struct mmci_platform_data mop500_sdi0_data = { |
84 | .ios_handler = mop500_sdi0_ios_handler, | ||
85 | .ocr_mask = MMC_VDD_29_30, | 55 | .ocr_mask = MMC_VDD_29_30, |
86 | .f_max = 50000000, | 56 | .f_max = 50000000, |
87 | .capabilities = MMC_CAP_4_BIT_DATA | | 57 | .capabilities = MMC_CAP_4_BIT_DATA | |
@@ -101,22 +71,6 @@ struct mmci_platform_data mop500_sdi0_data = { | |||
101 | 71 | ||
102 | static void sdi0_configure(struct device *parent) | 72 | static void sdi0_configure(struct device *parent) |
103 | { | 73 | { |
104 | int ret; | ||
105 | |||
106 | ret = gpio_request(sdi0_en, "level shifter enable"); | ||
107 | if (!ret) | ||
108 | ret = gpio_request(sdi0_vsel, | ||
109 | "level shifter 1v8-3v select"); | ||
110 | |||
111 | if (ret) { | ||
112 | pr_warning("unable to config sdi0 gpios for level shifter.\n"); | ||
113 | return; | ||
114 | } | ||
115 | |||
116 | /* Select the default 2.9V and enable level shifter */ | ||
117 | gpio_direction_output(sdi0_vsel, 0); | ||
118 | gpio_direction_output(sdi0_en, 1); | ||
119 | |||
120 | /* Add the device, force v2 to subrevision 1 */ | 74 | /* Add the device, force v2 to subrevision 1 */ |
121 | db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID); | 75 | db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID); |
122 | } | 76 | } |
@@ -124,8 +78,6 @@ static void sdi0_configure(struct device *parent) | |||
124 | void mop500_sdi_tc35892_init(struct device *parent) | 78 | void mop500_sdi_tc35892_init(struct device *parent) |
125 | { | 79 | { |
126 | mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD; | 80 | mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD; |
127 | sdi0_en = GPIO_SDMMC_EN; | ||
128 | sdi0_vsel = GPIO_SDMMC_1V8_3V_SEL; | ||
129 | sdi0_configure(parent); | 81 | sdi0_configure(parent); |
130 | } | 82 | } |
131 | 83 | ||
@@ -264,8 +216,6 @@ void __init snowball_sdi_init(struct device *parent) | |||
264 | /* External Micro SD slot */ | 216 | /* External Micro SD slot */ |
265 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; | 217 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; |
266 | mop500_sdi0_data.cd_invert = true; | 218 | mop500_sdi0_data.cd_invert = true; |
267 | sdi0_en = SNOWBALL_SDMMC_EN_GPIO; | ||
268 | sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO; | ||
269 | sdi0_configure(parent); | 219 | sdi0_configure(parent); |
270 | } | 220 | } |
271 | 221 | ||
@@ -277,8 +227,6 @@ void __init hrefv60_sdi_init(struct device *parent) | |||
277 | db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); | 227 | db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
278 | /* External Micro SD slot */ | 228 | /* External Micro SD slot */ |
279 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; | 229 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; |
280 | sdi0_en = HREFV60_SDMMC_EN_GPIO; | ||
281 | sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; | ||
282 | sdi0_configure(parent); | 230 | sdi0_configure(parent); |
283 | /* WLAN SDIO channel */ | 231 | /* WLAN SDIO channel */ |
284 | 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 b03457881c4b..cd100d569f4d 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/mfd/abx500/ab8500.h> | 24 | #include <linux/mfd/abx500/ab8500.h> |
25 | #include <linux/regulator/ab8500.h> | 25 | #include <linux/regulator/ab8500.h> |
26 | #include <linux/regulator/fixed.h> | 26 | #include <linux/regulator/fixed.h> |
27 | #include <linux/regulator/driver.h> | ||
28 | #include <linux/regulator/gpio-regulator.h> | ||
27 | #include <linux/mfd/tc3589x.h> | 29 | #include <linux/mfd/tc3589x.h> |
28 | #include <linux/mfd/tps6105x.h> | 30 | #include <linux/mfd/tps6105x.h> |
29 | #include <linux/mfd/abx500/ab8500-gpio.h> | 31 | #include <linux/mfd/abx500/ab8500-gpio.h> |
@@ -89,6 +91,37 @@ static struct platform_device snowball_gpio_en_3v3_regulator_dev = { | |||
89 | }, | 91 | }, |
90 | }; | 92 | }; |
91 | 93 | ||
94 | /* Dynamically populated. */ | ||
95 | static struct gpio sdi0_reg_gpios[] = { | ||
96 | { 0, GPIOF_OUT_INIT_LOW, "mmci_vsel" }, | ||
97 | }; | ||
98 | |||
99 | static struct gpio_regulator_state sdi0_reg_states[] = { | ||
100 | { .value = 2900000, .gpios = (0 << 0) }, | ||
101 | { .value = 1800000, .gpios = (1 << 0) }, | ||
102 | }; | ||
103 | |||
104 | static struct gpio_regulator_config sdi0_reg_info = { | ||
105 | .supply_name = "ext-mmc-level-shifter", | ||
106 | .gpios = sdi0_reg_gpios, | ||
107 | .nr_gpios = ARRAY_SIZE(sdi0_reg_gpios), | ||
108 | .states = sdi0_reg_states, | ||
109 | .nr_states = ARRAY_SIZE(sdi0_reg_states), | ||
110 | .type = REGULATOR_VOLTAGE, | ||
111 | .enable_high = 1, | ||
112 | .enabled_at_boot = 0, | ||
113 | .init_data = &sdi0_reg_init_data, | ||
114 | .startup_delay = 100, | ||
115 | }; | ||
116 | |||
117 | static struct platform_device sdi0_regulator = { | ||
118 | .name = "gpio-regulator", | ||
119 | .id = -1, | ||
120 | .dev = { | ||
121 | .platform_data = &sdi0_reg_info, | ||
122 | }, | ||
123 | }; | ||
124 | |||
92 | static struct abx500_gpio_platform_data ab8500_gpio_pdata = { | 125 | static struct abx500_gpio_platform_data ab8500_gpio_pdata = { |
93 | .gpio_base = MOP500_AB8500_PIN_GPIO(1), | 126 | .gpio_base = MOP500_AB8500_PIN_GPIO(1), |
94 | }; | 127 | }; |
@@ -481,6 +514,7 @@ static struct hash_platform_data u8500_hash1_platform_data = { | |||
481 | /* add any platform devices here - TODO */ | 514 | /* add any platform devices here - TODO */ |
482 | static struct platform_device *mop500_platform_devs[] __initdata = { | 515 | static struct platform_device *mop500_platform_devs[] __initdata = { |
483 | &mop500_gpio_keys_device, | 516 | &mop500_gpio_keys_device, |
517 | &sdi0_regulator, | ||
484 | }; | 518 | }; |
485 | 519 | ||
486 | #ifdef CONFIG_STE_DMA40 | 520 | #ifdef CONFIG_STE_DMA40 |
@@ -624,6 +658,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
624 | &snowball_gpio_en_3v3_regulator_dev, | 658 | &snowball_gpio_en_3v3_regulator_dev, |
625 | &u8500_thsens_device, | 659 | &u8500_thsens_device, |
626 | &u8500_cpufreq_cooling_device, | 660 | &u8500_cpufreq_cooling_device, |
661 | &sdi0_regulator, | ||
627 | }; | 662 | }; |
628 | 663 | ||
629 | static void __init mop500_init_machine(void) | 664 | static void __init mop500_init_machine(void) |
@@ -635,6 +670,9 @@ static void __init mop500_init_machine(void) | |||
635 | platform_device_register(&db8500_prcmu_device); | 670 | platform_device_register(&db8500_prcmu_device); |
636 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | 671 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
637 | 672 | ||
673 | sdi0_reg_info.enable_gpio = GPIO_SDMMC_EN; | ||
674 | sdi0_reg_info.gpios[0].gpio = GPIO_SDMMC_1V8_3V_SEL; | ||
675 | |||
638 | mop500_pinmaps_init(); | 676 | mop500_pinmaps_init(); |
639 | parent = u8500_init_devices(&ab8500_platdata); | 677 | parent = u8500_init_devices(&ab8500_platdata); |
640 | 678 | ||
@@ -668,6 +706,10 @@ static void __init snowball_init_machine(void) | |||
668 | int i; | 706 | int i; |
669 | 707 | ||
670 | platform_device_register(&db8500_prcmu_device); | 708 | platform_device_register(&db8500_prcmu_device); |
709 | |||
710 | sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO; | ||
711 | sdi0_reg_info.gpios[0].gpio = SNOWBALL_SDMMC_1V8_3V_GPIO; | ||
712 | |||
671 | snowball_pinmaps_init(); | 713 | snowball_pinmaps_init(); |
672 | parent = u8500_init_devices(&ab8500_platdata); | 714 | parent = u8500_init_devices(&ab8500_platdata); |
673 | 715 | ||
@@ -701,6 +743,9 @@ static void __init hrefv60_init_machine(void) | |||
701 | */ | 743 | */ |
702 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | 744 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; |
703 | 745 | ||
746 | sdi0_reg_info.enable_gpio = HREFV60_SDMMC_EN_GPIO; | ||
747 | sdi0_reg_info.gpios[0].gpio = HREFV60_SDMMC_1V8_3V_GPIO; | ||
748 | |||
704 | hrefv60_pinmaps_init(); | 749 | hrefv60_pinmaps_init(); |
705 | parent = u8500_init_devices(&ab8500_platdata); | 750 | parent = u8500_init_devices(&ab8500_platdata); |
706 | 751 | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 19235cf7bbe3..1c7f794ad7d1 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), |
diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c index 6b889a0e90b3..9d9add1e816d 100644 --- a/drivers/clk/ux500/u8500_clk.c +++ b/drivers/clk/ux500/u8500_clk.c | |||
@@ -324,7 +324,8 @@ void u8500_clk_init(void) | |||
324 | 324 | ||
325 | clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, | 325 | clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, |
326 | BIT(0), 0); | 326 | BIT(0), 0); |
327 | clk_register_clkdev(clk, NULL, "fsmc"); | 327 | clk_register_clkdev(clk, "fsmc", NULL); |
328 | clk_register_clkdev(clk, NULL, "smsc911x"); | ||
328 | 329 | ||
329 | clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, | 330 | clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, |
330 | BIT(1), 0); | 331 | BIT(1), 0); |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 372e921389c8..375c109607ff 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1141,6 +1141,11 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
1141 | case MMC_POWER_OFF: | 1141 | case MMC_POWER_OFF: |
1142 | if (!IS_ERR(mmc->supply.vmmc)) | 1142 | if (!IS_ERR(mmc->supply.vmmc)) |
1143 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); | 1143 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); |
1144 | |||
1145 | if (!IS_ERR(mmc->supply.vqmmc) && | ||
1146 | regulator_is_enabled(mmc->supply.vqmmc)) | ||
1147 | regulator_disable(mmc->supply.vqmmc); | ||
1148 | |||
1144 | break; | 1149 | break; |
1145 | case MMC_POWER_UP: | 1150 | case MMC_POWER_UP: |
1146 | if (!IS_ERR(mmc->supply.vmmc)) | 1151 | if (!IS_ERR(mmc->supply.vmmc)) |
@@ -1155,6 +1160,10 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
1155 | 1160 | ||
1156 | break; | 1161 | break; |
1157 | case MMC_POWER_ON: | 1162 | case MMC_POWER_ON: |
1163 | if (!IS_ERR(mmc->supply.vqmmc) && | ||
1164 | !regulator_is_enabled(mmc->supply.vqmmc)) | ||
1165 | regulator_enable(mmc->supply.vqmmc); | ||
1166 | |||
1158 | pwr |= MCI_PWR_ON; | 1167 | pwr |= MCI_PWR_ON; |
1159 | break; | 1168 | break; |
1160 | } | 1169 | } |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index da5cc9a3b34c..df77df16d991 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 33 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
34 | 34 | ||
35 | #include <linux/crc32.h> | 35 | #include <linux/crc32.h> |
36 | #include <linux/clk.h> | ||
36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
37 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
38 | #include <linux/etherdevice.h> | 39 | #include <linux/etherdevice.h> |
@@ -144,6 +145,9 @@ struct smsc911x_data { | |||
144 | 145 | ||
145 | /* regulators */ | 146 | /* regulators */ |
146 | struct regulator_bulk_data supplies[SMSC911X_NUM_SUPPLIES]; | 147 | struct regulator_bulk_data supplies[SMSC911X_NUM_SUPPLIES]; |
148 | |||
149 | /* clock */ | ||
150 | struct clk *clk; | ||
147 | }; | 151 | }; |
148 | 152 | ||
149 | /* Easy access to information */ | 153 | /* Easy access to information */ |
@@ -369,7 +373,7 @@ out: | |||
369 | } | 373 | } |
370 | 374 | ||
371 | /* | 375 | /* |
372 | * enable resources, currently just regulators. | 376 | * enable regulator and clock resources. |
373 | */ | 377 | */ |
374 | static int smsc911x_enable_resources(struct platform_device *pdev) | 378 | static int smsc911x_enable_resources(struct platform_device *pdev) |
375 | { | 379 | { |
@@ -382,6 +386,13 @@ static int smsc911x_enable_resources(struct platform_device *pdev) | |||
382 | if (ret) | 386 | if (ret) |
383 | netdev_err(ndev, "failed to enable regulators %d\n", | 387 | netdev_err(ndev, "failed to enable regulators %d\n", |
384 | ret); | 388 | ret); |
389 | |||
390 | if (!IS_ERR(pdata->clk)) { | ||
391 | ret = clk_prepare_enable(pdata->clk); | ||
392 | if (ret < 0) | ||
393 | netdev_err(ndev, "failed to enable clock %d\n", ret); | ||
394 | } | ||
395 | |||
385 | return ret; | 396 | return ret; |
386 | } | 397 | } |
387 | 398 | ||
@@ -396,6 +407,10 @@ static int smsc911x_disable_resources(struct platform_device *pdev) | |||
396 | 407 | ||
397 | ret = regulator_bulk_disable(ARRAY_SIZE(pdata->supplies), | 408 | ret = regulator_bulk_disable(ARRAY_SIZE(pdata->supplies), |
398 | pdata->supplies); | 409 | pdata->supplies); |
410 | |||
411 | if (!IS_ERR(pdata->clk)) | ||
412 | clk_disable_unprepare(pdata->clk); | ||
413 | |||
399 | return ret; | 414 | return ret; |
400 | } | 415 | } |
401 | 416 | ||
@@ -421,6 +436,12 @@ static int smsc911x_request_resources(struct platform_device *pdev) | |||
421 | if (ret) | 436 | if (ret) |
422 | netdev_err(ndev, "couldn't get regulators %d\n", | 437 | netdev_err(ndev, "couldn't get regulators %d\n", |
423 | ret); | 438 | ret); |
439 | |||
440 | /* Request clock */ | ||
441 | pdata->clk = clk_get(&pdev->dev, NULL); | ||
442 | if (IS_ERR(pdata->clk)) | ||
443 | netdev_warn(ndev, "couldn't get clock %li\n", PTR_ERR(pdata->clk)); | ||
444 | |||
424 | return ret; | 445 | return ret; |
425 | } | 446 | } |
426 | 447 | ||
@@ -436,6 +457,12 @@ static void smsc911x_free_resources(struct platform_device *pdev) | |||
436 | /* Free regulators */ | 457 | /* Free regulators */ |
437 | regulator_bulk_free(ARRAY_SIZE(pdata->supplies), | 458 | regulator_bulk_free(ARRAY_SIZE(pdata->supplies), |
438 | pdata->supplies); | 459 | pdata->supplies); |
460 | |||
461 | /* Free clock */ | ||
462 | if (!IS_ERR(pdata->clk)) { | ||
463 | clk_put(pdata->clk); | ||
464 | pdata->clk = NULL; | ||
465 | } | ||
439 | } | 466 | } |
440 | 467 | ||
441 | /* waits for MAC not busy, with timeout. Only called by smsc911x_mac_read | 468 | /* waits for MAC not busy, with timeout. Only called by smsc911x_mac_read |