aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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 /drivers
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 'drivers')
-rw-r--r--drivers/clk/tegra/clk-tegra20.c36
-rw-r--r--drivers/clk/ux500/u8500_clk.c3
-rw-r--r--drivers/mmc/host/mmci.c9
-rw-r--r--drivers/net/ethernet/smsc/smsc911x.c29
4 files changed, 41 insertions, 36 deletions
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index f873dcefe0de..bf194009e20f 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -711,8 +711,8 @@ static void tegra20_pll_init(void)
711} 711}
712 712
713static const char *cclk_parents[] = { "clk_m", "pll_c", "clk_32k", "pll_m", 713static const char *cclk_parents[] = { "clk_m", "pll_c", "clk_32k", "pll_m",
714 "pll_p_cclk", "pll_p_out4_cclk", 714 "pll_p", "pll_p_out4",
715 "pll_p_out3_cclk", "clk_d", "pll_x" }; 715 "pll_p_out3", "clk_d", "pll_x" };
716static const char *sclk_parents[] = { "clk_m", "pll_c_out1", "pll_p_out4", 716static const char *sclk_parents[] = { "clk_m", "pll_c_out1", "pll_p_out4",
717 "pll_p_out3", "pll_p_out2", "clk_d", 717 "pll_p_out3", "pll_p_out2", "clk_d",
718 "clk_32k", "pll_m_out1" }; 718 "clk_32k", "pll_m_out1" };
@@ -721,38 +721,6 @@ static void tegra20_super_clk_init(void)
721{ 721{
722 struct clk *clk; 722 struct clk *clk;
723 723
724 /*
725 * DIV_U71 dividers for CCLK, these dividers are used only
726 * if parent clock is fixed rate.
727 */
728
729 /*
730 * Clock input to cclk divided from pll_p using
731 * U71 divider of cclk.
732 */
733 clk = tegra_clk_register_divider("pll_p_cclk", "pll_p",
734 clk_base + SUPER_CCLK_DIVIDER, 0,
735 TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
736 clk_register_clkdev(clk, "pll_p_cclk", NULL);
737
738 /*
739 * Clock input to cclk divided from pll_p_out3 using
740 * U71 divider of cclk.
741 */
742 clk = tegra_clk_register_divider("pll_p_out3_cclk", "pll_p_out3",
743 clk_base + SUPER_CCLK_DIVIDER, 0,
744 TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
745 clk_register_clkdev(clk, "pll_p_out3_cclk", NULL);
746
747 /*
748 * Clock input to cclk divided from pll_p_out4 using
749 * U71 divider of cclk.
750 */
751 clk = tegra_clk_register_divider("pll_p_out4_cclk", "pll_p_out4",
752 clk_base + SUPER_CCLK_DIVIDER, 0,
753 TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
754 clk_register_clkdev(clk, "pll_p_out4_cclk", NULL);
755
756 /* CCLK */ 724 /* CCLK */
757 clk = tegra_clk_register_super_mux("cclk", cclk_parents, 725 clk = tegra_clk_register_super_mux("cclk", cclk_parents,
758 ARRAY_SIZE(cclk_parents), CLK_SET_RATE_PARENT, 726 ARRAY_SIZE(cclk_parents), CLK_SET_RATE_PARENT,
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 48e2b99bec51..3663b9e04a31 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 */
374static int smsc911x_enable_resources(struct platform_device *pdev) 378static 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