Skip to content

Commit

Permalink
Merge tag 'imx-cleanup-3.19' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/shawnguo/linux into next/cleanup

Pull "The i.MX cleanup for 3.19" from Shawn Guo:

 - Clean up reset handler for DT machines, since reset has been handled
   in watchdog driver
 - Remove unneeded .map_io hook for a couple of i.MX6 machines
 - A few small i.MX6 device tree source cleanups
 - Some random iomuxc and pllv3 code cleanup

* tag 'imx-cleanup-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx: Remove unneeded .map_io initialization
  ARM: dts: imx6qdl-sabresd: Fix the microphone route
  ARM: imx: refactor mxc_iomux_mode()
  ARM: imx: simplify clk_pllv3_prepare()
  ARM: imx6q: drop unnecessary semicolon
  ARM: imx: clean up machine mxc_arch_reset_init_dt reset init
  ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property
  ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property
  ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Nov 28, 2014
2 parents c746dd2 + b50e7df commit ad77b79
Show file tree
Hide file tree
Showing 22 changed files with 10 additions and 103 deletions.
1 change: 0 additions & 1 deletion arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@
};

&ssi1 {
fsl,mode = "i2s-slave";
status = "okay";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@
};

&ssi1 {
fsl,mode = "i2s-slave";
status = "okay";
};

Expand Down
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,10 @@
};

&ssi1 {
fsl,mode = "i2s-slave";
status = "okay";
};

&ssi2 {
fsl,mode = "i2s-slave";
status = "okay";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/imx6qdl-rex.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@
};

&ssi1 {
fsl,mode = "i2s-slave";
status = "okay";
};

Expand Down
8 changes: 3 additions & 5 deletions arch/arm/boot/dts/imx6qdl-sabresd.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@
"Headphone Jack", "HPOUTR",
"Ext Spk", "SPKOUTL",
"Ext Spk", "SPKOUTR",
"MICBIAS", "AMIC",
"IN3R", "MICBIAS",
"DMIC", "MICBIAS",
"DMICDAT", "DMIC";
"AMIC", "MICBIAS",
"IN3R", "AMIC";
mux-int-port = <2>;
mux-ext-port = <3>;
};
Expand Down Expand Up @@ -179,7 +177,7 @@
codec: wm8962@1a {
compatible = "wlf,wm8962";
reg = <0x1a>;
clocks = <&clks 201>;
clocks = <&clks IMX6QDL_CLK_CKO>;
DCVDD-supply = <&reg_audio>;
DBVDD-supply = <&reg_audio>;
AVDD-supply = <&reg_audio>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/clk-imx6q.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
post_div_table[2].div = 1;
video_div_table[1].div = 1;
video_div_table[2].div = 1;
};
}

clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
clk[IMX6QDL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
Expand Down
7 changes: 1 addition & 6 deletions arch/arm/mach-imx/clk-pllv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
{
struct clk_pllv3 *pll = to_clk_pllv3(hw);
u32 val;
int ret;

val = readl_relaxed(pll->base);
if (pll->powerup_set)
Expand All @@ -78,11 +77,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
val &= ~BM_PLL_POWER;
writel_relaxed(val, pll->base);

ret = clk_pllv3_wait_lock(pll);
if (ret)
return ret;

return 0;
return clk_pllv3_wait_lock(pll);
}

static void clk_pllv3_unprepare(struct clk_hw *hw)
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-imx/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ struct platform_device *mxc_register_gpio(char *name, int id,
void mxc_set_cpu_type(unsigned int type);
void mxc_restart(enum reboot_mode, const char *);
void mxc_arch_reset_init(void __iomem *);
void mxc_arch_reset_init_dt(void);
int mx51_revision(void);
int mx53_revision(void);
void imx_set_aips(void __iomem *);
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/mach-imx/imx25-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
#include "common.h"
#include "mx25.h"

static void __init imx25_dt_init(void)
{
mxc_arch_reset_init_dt();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const imx25_dt_board_compat[] __initconst = {
"fsl,imx25",
NULL
Expand All @@ -33,7 +26,5 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
.map_io = mx25_map_io,
.init_early = imx25_init_early,
.init_irq = mx25_init_irq,
.init_machine = imx25_dt_init,
.dt_compat = imx25_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
3 changes: 0 additions & 3 deletions arch/arm/mach-imx/imx27-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ static void __init imx27_dt_init(void)
{
struct platform_device_info devinfo = { .name = "cpufreq-dt", };

mxc_arch_reset_init_dt();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

platform_device_register_full(&devinfo);
Expand All @@ -40,5 +38,4 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
.init_irq = mx27_init_irq,
.init_machine = imx27_dt_init,
.dt_compat = imx27_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
9 changes: 0 additions & 9 deletions arch/arm/mach-imx/imx31-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
#include "common.h"
#include "mx31.h"

static void __init imx31_dt_init(void)
{
mxc_arch_reset_init_dt();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const imx31_dt_board_compat[] __initconst = {
"fsl,imx31",
NULL
Expand All @@ -40,7 +33,5 @@ DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
.init_early = imx31_init_early,
.init_irq = mx31_init_irq,
.init_time = imx31_dt_timer_init,
.init_machine = imx31_dt_init,
.dt_compat = imx31_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
10 changes: 0 additions & 10 deletions arch/arm/mach-imx/imx35-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
#include "common.h"
#include "mx35.h"

static void __init imx35_dt_init(void)
{
mxc_arch_reset_init_dt();

of_platform_populate(NULL, of_default_bus_match_table,
NULL, NULL);
}

static void __init imx35_irq_init(void)
{
imx_init_l2cache();
Expand All @@ -43,7 +35,5 @@ DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
.map_io = mx35_map_io,
.init_early = imx35_init_early,
.init_irq = imx35_irq_init,
.init_machine = imx35_dt_init,
.dt_compat = imx35_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
8 changes: 4 additions & 4 deletions arch/arm/mach-imx/iomux-imx31.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ static unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
/*
* set the mode for a IOMUX pin.
*/
int mxc_iomux_mode(unsigned int pin_mode)
void mxc_iomux_mode(unsigned int pin_mode)
{
u32 field, l, mode, ret = 0;
u32 field;
u32 l;
u32 mode;
void __iomem *reg;

reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
Expand All @@ -61,8 +63,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
__raw_writel(l, reg);

spin_unlock(&gpio_mux_lock);

return ret;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/iomux-mx3.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool en);
* It is called by the setup functions and should not be called directly anymore.
* It is here visible for backward compatibility
*/
int mxc_iomux_mode(unsigned int pin_mode);
void mxc_iomux_mode(unsigned int pin_mode);

#define IOMUX_PADNUM_MASK 0x1ff
#define IOMUX_GPIONUM_SHIFT 9
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/mach-imx/mach-imx50.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,12 @@

#include "common.h"

static void __init imx50_dt_init(void)
{
mxc_arch_reset_init_dt();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const imx50_dt_board_compat[] __initconst = {
"fsl,imx50",
NULL
};

DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
.init_irq = tzic_init_irq,
.init_machine = imx50_dt_init,
.dt_compat = imx50_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
2 changes: 0 additions & 2 deletions arch/arm/mach-imx/mach-imx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ static void __init imx51_dt_init(void)
{
struct platform_device_info devinfo = { .name = "cpufreq-dt", };

mxc_arch_reset_init_dt();
imx51_ipu_mipi_setup();
imx_src_init();

Expand All @@ -78,5 +77,4 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
.init_machine = imx51_dt_init,
.init_late = imx51_init_late,
.dt_compat = imx51_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
2 changes: 0 additions & 2 deletions arch/arm/mach-imx/mach-imx53.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ static void __init imx53_init_early(void)

static void __init imx53_dt_init(void)
{
mxc_arch_reset_init_dt();
imx_src_init();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
Expand All @@ -54,5 +53,4 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
.init_machine = imx53_dt_init,
.init_late = imx53_init_late,
.dt_compat = imx53_dt_board_compat,
.restart = mxc_restart,
MACHINE_END
3 changes: 0 additions & 3 deletions arch/arm/mach-imx/mach-imx6q.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ static void __init imx6q_init_machine(void)
imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
imx_get_soc_revision());

mxc_arch_reset_init_dt();

parent = imx_soc_device_init();
if (parent == NULL)
pr_warn("failed to initialize soc device\n");
Expand Down Expand Up @@ -409,5 +407,4 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
.init_machine = imx6q_init_machine,
.init_late = imx6q_init_late,
.dt_compat = imx6q_dt_compat,
.restart = mxc_restart,
MACHINE_END
4 changes: 0 additions & 4 deletions arch/arm/mach-imx/mach-imx6sl.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ static void __init imx6sl_init_machine(void)
{
struct device *parent;

mxc_arch_reset_init_dt();

parent = imx_soc_device_init();
if (parent == NULL)
pr_warn("failed to initialize soc device\n");
Expand All @@ -76,10 +74,8 @@ static const char * const imx6sl_dt_compat[] __initconst = {
};

DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
.map_io = debug_ll_io_init,
.init_irq = imx6sl_init_irq,
.init_machine = imx6sl_init_machine,
.init_late = imx6sl_init_late,
.dt_compat = imx6sl_dt_compat,
.restart = mxc_restart,
MACHINE_END
4 changes: 0 additions & 4 deletions arch/arm/mach-imx/mach-imx6sx.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ static void __init imx6sx_init_machine(void)
{
struct device *parent;

mxc_arch_reset_init_dt();

parent = imx_soc_device_init();
if (parent == NULL)
pr_warn("failed to initialize soc device\n");
Expand Down Expand Up @@ -53,10 +51,8 @@ static const char * const imx6sx_dt_compat[] __initconst = {
};

DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
.map_io = debug_ll_io_init,
.init_irq = imx6sx_init_irq,
.init_machine = imx6sx_init_machine,
.dt_compat = imx6sx_dt_compat,
.init_late = imx6sx_init_late,
.restart = mxc_restart,
MACHINE_END
10 changes: 0 additions & 10 deletions arch/arm/mach-imx/mach-vf610.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
#include <asm/mach/arch.h>
#include <asm/hardware/cache-l2x0.h>

#include "common.h"

static void __init vf610_init_machine(void)
{
mxc_arch_reset_init_dt();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const vf610_dt_compat[] __initconst = {
"fsl,vf610",
NULL,
Expand All @@ -28,7 +20,5 @@ static const char * const vf610_dt_compat[] __initconst = {
DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
.init_machine = vf610_init_machine,
.dt_compat = vf610_dt_compat,
.restart = mxc_restart,
MACHINE_END
15 changes: 0 additions & 15 deletions arch/arm/mach-imx/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,6 @@ void __init mxc_arch_reset_init(void __iomem *base)
clk_prepare(wdog_clk);
}

void __init mxc_arch_reset_init_dt(void)
{
struct device_node *np;

np = of_find_compatible_node(NULL, NULL, "fsl,imx21-wdt");
wdog_base = of_iomap(np, 0);
WARN_ON(!wdog_base);

wdog_clk = of_clk_get(np, 0);
if (IS_ERR(wdog_clk))
pr_warn("%s: failed to get wdog clock\n", __func__);
else
clk_prepare(wdog_clk);
}

#ifdef CONFIG_CACHE_L2X0
void __init imx_init_l2cache(void)
{
Expand Down

0 comments on commit ad77b79

Please sign in to comment.