mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ARM: arm-soc cleanup for 3.10
Here is a collection of cleanup patches. Among the pieces that stand out are:
- The deletion of h720x platforms
- Split of at91 non-dt platforms to their own Kconfig file to keep them separate
- General cleanups and refactoring of i.MX and MXS platforms
- Some restructuring of clock tables for OMAP
- Convertion of PMC driver for Tegra to dt-only
- Some renames of sunxi -> sun4i (Allwinner A10)
- ... plus a bunch of other stuff that I haven't mentioned
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJRggUqAAoJEIwa5zzehBx3HjEQAJwp7heRs/HwTDzmzcyHkRMV
usbaa9dHBuAZ0DzsWjLK99xEn8VWD9TvbeP6hN5gNhxko06UVza3o8PI2iV1ztMB
9K3u2+LS5on/5cOxnsU1va16h5hBZ0ZIgNx5NY+PZ5mBY6v1U3qTjljPP62iXp63
w+sdXeZDe/c5JvuoDRbY0OBR++3Jp8cQg7KbU78jWz3r5D2rC1zwhkf2audcRY6b
jIWTj9M8CHynh/D6OzKqDcOYorBHNSRj0YbiWS2nnMfm+0V8nya00EPRpCPRiBUb
sobSy1CI9Qxiih3bOf6QCfzCRzJ5hbtE0zlI8g3bqtEZ1yOsE949HrKapWHJJdIU
JNTXrxXORAnaRhbzvSPNpp/iJBSDQRsfEETgv5BuHg/4lzTQfzElySbcgb4EeoHr
7Zt8ZR2/Du+u76qIPqs19ES3Wx+nOEOfSDAgZmlfPvlwmlGDYvqAXoeJ006VXnhG
JacLuD/cFnJ1w00Bcl48ZXMIsVkoRqjvsCG5q688HGXMM1lU8DfgUpQY6OCWAbdu
kFnBinJZk+HbE8FGS8O0BoQ+oiC0YIr2XhATL66PGHq7bLHb5ycwvZ7mrfC0AN9j
M9hqTFednwfo9wF8vSj5nMsxXwP8/mky4ECGoFvLsMYDosunrNVnAHtTgDSE+ZgO
6kQJ1P8jBBXn2LyjF88W
=xCAx
-----END PGP SIGNATURE-----
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanup from Olof Johansson:
"Here is a collection of cleanup patches. Among the pieces that stand
out are:
- The deletion of h720x platforms
- Split of at91 non-dt platforms to their own Kconfig file to keep
them separate
- General cleanups and refactoring of i.MX and MXS platforms
- Some restructuring of clock tables for OMAP
- Convertion of PMC driver for Tegra to dt-only
- Some renames of sunxi -> sun4i (Allwinner A10)
- ... plus a bunch of other stuff that I haven't mentioned"
* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
ARM: i.MX: remove unused ARCH_* configs
ARM i.MX53: remove platform ahci support
ARM: sunxi: Rework the restart code
irqchip: sunxi: Rename sunxi to sun4i
irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
clocksource: sunxi: Rename sunxi to sun4i
clocksource: sunxi: make use of CLKSRC_OF
clocksource: sunxi: Cleanup the timer code
ARM: at91: remove trailing semicolon from macros
ARM: at91/setup: fix trivial typos
ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
ARM: EXYNOS: change the name of USB ohci header
ARM: SAMSUNG: Remove unnecessary code for dma
ARM: S3C24XX: Remove unused GPIO drive strength register definitions
ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
...
This commit is contained in:
commit
a7726350e0
263 changed files with 2919 additions and 6559 deletions
|
|
@ -15,12 +15,15 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/mx23.h>
|
||||
#include <linux/of_address.h>
|
||||
#include "clk.h"
|
||||
|
||||
#define DIGCTRL MX23_IO_ADDRESS(MX23_DIGCTL_BASE_ADDR)
|
||||
#define CLKCTRL MX23_IO_ADDRESS(MX23_CLKCTRL_BASE_ADDR)
|
||||
static void __iomem *clkctrl;
|
||||
static void __iomem *digctrl;
|
||||
|
||||
#define CLKCTRL clkctrl
|
||||
#define DIGCTRL digctrl
|
||||
|
||||
#define PLLCTRL0 (CLKCTRL + 0x0000)
|
||||
#define CPU (CLKCTRL + 0x0020)
|
||||
#define HBUS (CLKCTRL + 0x0030)
|
||||
|
|
@ -48,10 +51,10 @@ static void __init clk_misc_init(void)
|
|||
u32 val;
|
||||
|
||||
/* Gate off cpu clock in WFI for power saving */
|
||||
__mxs_setl(1 << BP_CPU_INTERRUPT_WAIT, CPU);
|
||||
writel_relaxed(1 << BP_CPU_INTERRUPT_WAIT, CPU + SET);
|
||||
|
||||
/* Clear BYPASS for SAIF */
|
||||
__mxs_clrl(1 << BP_CLKSEQ_BYPASS_SAIF, CLKSEQ);
|
||||
writel_relaxed(1 << BP_CLKSEQ_BYPASS_SAIF, CLKSEQ + CLR);
|
||||
|
||||
/* SAIF has to use frac div for functional operation */
|
||||
val = readl_relaxed(SAIF);
|
||||
|
|
@ -62,14 +65,14 @@ static void __init clk_misc_init(void)
|
|||
* Source ssp clock from ref_io than ref_xtal,
|
||||
* as ref_xtal only provides 24 MHz as maximum.
|
||||
*/
|
||||
__mxs_clrl(1 << BP_CLKSEQ_BYPASS_SSP, CLKSEQ);
|
||||
writel_relaxed(1 << BP_CLKSEQ_BYPASS_SSP, CLKSEQ + CLR);
|
||||
|
||||
/*
|
||||
* 480 MHz seems too high to be ssp clock source directly,
|
||||
* so set frac to get a 288 MHz ref_io.
|
||||
*/
|
||||
__mxs_clrl(0x3f << BP_FRAC_IOFRAC, FRAC);
|
||||
__mxs_setl(30 << BP_FRAC_IOFRAC, FRAC);
|
||||
writel_relaxed(0x3f << BP_FRAC_IOFRAC, FRAC + CLR);
|
||||
writel_relaxed(30 << BP_FRAC_IOFRAC, FRAC + SET);
|
||||
}
|
||||
|
||||
static const char *sel_pll[] __initconst = { "pll", "ref_xtal", };
|
||||
|
|
@ -101,6 +104,14 @@ int __init mx23_clocks_init(void)
|
|||
struct device_node *np;
|
||||
u32 i;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
|
||||
digctrl = of_iomap(np, 0);
|
||||
WARN_ON(!digctrl);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
|
||||
clkctrl = of_iomap(np, 0);
|
||||
WARN_ON(!clkctrl);
|
||||
|
||||
clk_misc_init();
|
||||
|
||||
clks[ref_xtal] = mxs_clk_fixed("ref_xtal", 24000000);
|
||||
|
|
@ -153,19 +164,12 @@ int __init mx23_clocks_init(void)
|
|||
return PTR_ERR(clks[i]);
|
||||
}
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
|
||||
if (np) {
|
||||
clk_data.clks = clks;
|
||||
clk_data.clk_num = ARRAY_SIZE(clks);
|
||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||
}
|
||||
|
||||
clk_register_clkdev(clks[clk32k], NULL, "timrot");
|
||||
clk_data.clks = clks;
|
||||
clk_data.clk_num = ARRAY_SIZE(clks);
|
||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
||||
clk_prepare_enable(clks[clks_init_on[i]]);
|
||||
|
||||
mxs_timer_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,12 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <linux/of_address.h>
|
||||
#include "clk.h"
|
||||
|
||||
#define CLKCTRL MX28_IO_ADDRESS(MX28_CLKCTRL_BASE_ADDR)
|
||||
static void __iomem *clkctrl;
|
||||
#define CLKCTRL clkctrl
|
||||
|
||||
#define PLL0CTRL0 (CLKCTRL + 0x0000)
|
||||
#define PLL1CTRL0 (CLKCTRL + 0x0020)
|
||||
#define PLL2CTRL0 (CLKCTRL + 0x0040)
|
||||
|
|
@ -53,7 +54,8 @@
|
|||
#define BP_FRAC0_IO1FRAC 16
|
||||
#define BP_FRAC0_IO0FRAC 24
|
||||
|
||||
#define DIGCTRL MX28_IO_ADDRESS(MX28_DIGCTL_BASE_ADDR)
|
||||
static void __iomem *digctrl;
|
||||
#define DIGCTRL digctrl
|
||||
#define BP_SAIF_CLKMUX 10
|
||||
|
||||
/*
|
||||
|
|
@ -72,8 +74,8 @@ int mxs_saif_clkmux_select(unsigned int clkmux)
|
|||
if (clkmux > 0x3)
|
||||
return -EINVAL;
|
||||
|
||||
__mxs_clrl(0x3 << BP_SAIF_CLKMUX, DIGCTRL);
|
||||
__mxs_setl(clkmux << BP_SAIF_CLKMUX, DIGCTRL);
|
||||
writel_relaxed(0x3 << BP_SAIF_CLKMUX, DIGCTRL + CLR);
|
||||
writel_relaxed(clkmux << BP_SAIF_CLKMUX, DIGCTRL + SET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -83,13 +85,13 @@ static void __init clk_misc_init(void)
|
|||
u32 val;
|
||||
|
||||
/* Gate off cpu clock in WFI for power saving */
|
||||
__mxs_setl(1 << BP_CPU_INTERRUPT_WAIT, CPU);
|
||||
writel_relaxed(1 << BP_CPU_INTERRUPT_WAIT, CPU + SET);
|
||||
|
||||
/* 0 is a bad default value for a divider */
|
||||
__mxs_setl(1 << BP_ENET_DIV_TIME, ENET);
|
||||
writel_relaxed(1 << BP_ENET_DIV_TIME, ENET + SET);
|
||||
|
||||
/* Clear BYPASS for SAIF */
|
||||
__mxs_clrl(0x3 << BP_CLKSEQ_BYPASS_SAIF0, CLKSEQ);
|
||||
writel_relaxed(0x3 << BP_CLKSEQ_BYPASS_SAIF0, CLKSEQ + CLR);
|
||||
|
||||
/* SAIF has to use frac div for functional operation */
|
||||
val = readl_relaxed(SAIF0);
|
||||
|
|
@ -109,7 +111,7 @@ static void __init clk_misc_init(void)
|
|||
* Source ssp clock from ref_io than ref_xtal,
|
||||
* as ref_xtal only provides 24 MHz as maximum.
|
||||
*/
|
||||
__mxs_clrl(0xf << BP_CLKSEQ_BYPASS_SSP0, CLKSEQ);
|
||||
writel_relaxed(0xf << BP_CLKSEQ_BYPASS_SSP0, CLKSEQ + CLR);
|
||||
|
||||
/*
|
||||
* 480 MHz seems too high to be ssp clock source directly,
|
||||
|
|
@ -156,6 +158,14 @@ int __init mx28_clocks_init(void)
|
|||
struct device_node *np;
|
||||
u32 i;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl");
|
||||
digctrl = of_iomap(np, 0);
|
||||
WARN_ON(!digctrl);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl");
|
||||
clkctrl = of_iomap(np, 0);
|
||||
WARN_ON(!clkctrl);
|
||||
|
||||
clk_misc_init();
|
||||
|
||||
clks[ref_xtal] = mxs_clk_fixed("ref_xtal", 24000000);
|
||||
|
|
@ -231,20 +241,14 @@ int __init mx28_clocks_init(void)
|
|||
return PTR_ERR(clks[i]);
|
||||
}
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl");
|
||||
if (np) {
|
||||
clk_data.clks = clks;
|
||||
clk_data.clk_num = ARRAY_SIZE(clks);
|
||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||
}
|
||||
clk_data.clks = clks;
|
||||
clk_data.clk_num = ARRAY_SIZE(clks);
|
||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||
|
||||
clk_register_clkdev(clks[xbus], NULL, "timrot");
|
||||
clk_register_clkdev(clks[enet_out], NULL, "enet_out");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
||||
clk_prepare_enable(clks[clks_init_on[i]]);
|
||||
|
||||
mxs_timer_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue