Commit 25918f98 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A mixed bag of fixes, some for merge window fallout (tegra, MXS), and
  a short series of fixes for marvell platforms that didn't make it in
  before 3.5."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: mxs: fix compile error caused by prom_update_property change
  ARM: dt: tegra trimslice: enable USB2 port
  ARM: dt: tegra trimslice: add vbus-gpio property
  ARM: vt8500: Add maintainer for VT8500 architecture
  ARM: Kirkwood: Replace mrvl with marvell
  ARM: Orion: fix driver probe error handling with respect to clk
  ARM: Dove: Fixup ge00 initialisation
  ARM: Kirkwood: Fix PHY disable clk problems
  ARM: Kirkwood: Ensure runit clock always ticks.
  ARM: versatile: Don't use platform clock for Integrator & VE
  ARM: tegra: harmony: add regulator supply name and its input supply
parents aa0b3b2b fa7c865a
NAND support for Marvell Orion SoC platforms NAND support for Marvell Orion SoC platforms
Required properties: Required properties:
- compatible : "mrvl,orion-nand". - compatible : "marvell,orion-nand".
- reg : Base physical address of the NAND and length of memory mapped - reg : Base physical address of the NAND and length of memory mapped
region region
...@@ -24,7 +24,7 @@ nand@f4000000 { ...@@ -24,7 +24,7 @@ nand@f4000000 {
ale = <1>; ale = <1>;
bank-width = <1>; bank-width = <1>;
chip-delay = <25>; chip-delay = <25>;
compatible = "mrvl,orion-nand"; compatible = "marvell,orion-nand";
reg = <0xf4000000 0x400>; reg = <0xf4000000 0x400>;
partition@0 { partition@0 {
......
...@@ -1186,6 +1186,17 @@ S: Maintained ...@@ -1186,6 +1186,17 @@ S: Maintained
F: arch/arm/mach-pxa/vpac270.c F: arch/arm/mach-pxa/vpac270.c
F: arch/arm/mach-pxa/include/mach/vpac270.h F: arch/arm/mach-pxa/include/mach/vpac270.h
ARM/VT8500 ARM ARCHITECTURE
M: Tony Prisk <linux@prisktech.co.nz>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-vt8500/
F: drivers/video/vt8500lcdfb.*
F: drivers/video/wm8505fb*
F: drivers/video/wmt_ge_rops.*
F: drivers/tty/serial/vt8500_serial.c
F: drivers/rtc/rtc-vt8500-c
ARM/ZIPIT Z2 SUPPORT ARM/ZIPIT Z2 SUPPORT
M: Marek Vasut <marek.vasut@gmail.com> M: Marek Vasut <marek.vasut@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
......
...@@ -279,7 +279,6 @@ config ARCH_INTEGRATOR ...@@ -279,7 +279,6 @@ config ARCH_INTEGRATOR
select ICST select ICST
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select PLAT_VERSATILE select PLAT_VERSATILE
select PLAT_VERSATILE_CLOCK
select PLAT_VERSATILE_FPGA_IRQ select PLAT_VERSATILE_FPGA_IRQ
select NEED_MACH_IO_H select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H select NEED_MACH_MEMORY_H
...@@ -336,7 +335,6 @@ config ARCH_VEXPRESS ...@@ -336,7 +335,6 @@ config ARCH_VEXPRESS
select ICST select ICST
select NO_IOPORT select NO_IOPORT
select PLAT_VERSATILE select PLAT_VERSATILE
select PLAT_VERSATILE_CLOCK
select PLAT_VERSATILE_CLCD select PLAT_VERSATILE_CLCD
select REGULATOR_FIXED_VOLTAGE if REGULATOR select REGULATOR_FIXED_VOLTAGE if REGULATOR
help help
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/ { / {
model = "D-Link DNS-320 NAS (Rev A1)"; model = "D-Link DNS-320 NAS (Rev A1)";
compatible = "dlink,dns-320-a1", "dlink,dns-320", "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; compatible = "dlink,dns-320-a1", "dlink,dns-320", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory { memory {
device_type = "memory"; device_type = "memory";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/ { / {
model = "D-Link DNS-325 NAS (Rev A1)"; model = "D-Link DNS-325 NAS (Rev A1)";
compatible = "dlink,dns-325-a1", "dlink,dns-325", "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; compatible = "dlink,dns-325-a1", "dlink,dns-325", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory { memory {
device_type = "memory"; device_type = "memory";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/ { / {
model = "Globalscale Technologies Dreamplug"; model = "Globalscale Technologies Dreamplug";
compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory { memory {
device_type = "memory"; device_type = "memory";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/ { / {
model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory { memory {
device_type = "memory"; device_type = "memory";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/ { / {
model = "Iomega Iconnect"; model = "Iomega Iconnect";
compatible = "iom,iconnect-1.1", "iom,iconnect", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; compatible = "iom,iconnect-1.1", "iom,iconnect", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory { memory {
device_type = "memory"; device_type = "memory";
......
/include/ "skeleton.dtsi" /include/ "skeleton.dtsi"
/ { / {
compatible = "mrvl,kirkwood"; compatible = "marvell,kirkwood";
ocp@f1000000 { ocp@f1000000 {
compatible = "simple-bus"; compatible = "simple-bus";
...@@ -28,7 +28,7 @@ serial@12100 { ...@@ -28,7 +28,7 @@ serial@12100 {
}; };
rtc@10300 { rtc@10300 {
compatible = "mrvl,kirkwood-rtc", "mrvl,orion-rtc"; compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
reg = <0x10300 0x20>; reg = <0x10300 0x20>;
interrupts = <53>; interrupts = <53>;
}; };
...@@ -39,7 +39,7 @@ nand@3000000 { ...@@ -39,7 +39,7 @@ nand@3000000 {
cle = <0>; cle = <0>;
ale = <1>; ale = <1>;
bank-width = <1>; bank-width = <1>;
compatible = "mrvl,orion-nand"; compatible = "marvell,orion-nand";
reg = <0x3000000 0x400>; reg = <0x3000000 0x400>;
chip-delay = <25>; chip-delay = <25>;
/* set partition map and/or chip-delay in board dts */ /* set partition map and/or chip-delay in board dts */
......
...@@ -276,9 +276,11 @@ rtc@56 { ...@@ -276,9 +276,11 @@ rtc@56 {
usb@c5000000 { usb@c5000000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */
}; };
usb@c5004000 { usb@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */
}; };
......
...@@ -101,8 +101,8 @@ void __init dove_ehci1_init(void) ...@@ -101,8 +101,8 @@ void __init dove_ehci1_init(void)
****************************************************************************/ ****************************************************************************/
void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data)
{ {
orion_ge00_init(eth_data, orion_ge00_init(eth_data, DOVE_GE00_PHYS_BASE,
DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM, 0); IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -67,6 +67,14 @@ void __init kirkwood_map_io(void) ...@@ -67,6 +67,14 @@ void __init kirkwood_map_io(void)
* CLK tree * CLK tree
****************************************************************************/ ****************************************************************************/
static void enable_sata0(void)
{
/* Enable PLL and IVREF */
writel(readl(SATA0_PHY_MODE_2) | 0xf, SATA0_PHY_MODE_2);
/* Enable PHY */
writel(readl(SATA0_IF_CTRL) & ~0x200, SATA0_IF_CTRL);
}
static void disable_sata0(void) static void disable_sata0(void)
{ {
/* Disable PLL and IVREF */ /* Disable PLL and IVREF */
...@@ -75,6 +83,14 @@ static void disable_sata0(void) ...@@ -75,6 +83,14 @@ static void disable_sata0(void)
writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL); writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL);
} }
static void enable_sata1(void)
{
/* Enable PLL and IVREF */
writel(readl(SATA1_PHY_MODE_2) | 0xf, SATA1_PHY_MODE_2);
/* Enable PHY */
writel(readl(SATA1_IF_CTRL) & ~0x200, SATA1_IF_CTRL);
}
static void disable_sata1(void) static void disable_sata1(void)
{ {
/* Disable PLL and IVREF */ /* Disable PLL and IVREF */
...@@ -107,23 +123,38 @@ static void disable_pcie1(void) ...@@ -107,23 +123,38 @@ static void disable_pcie1(void)
} }
} }
/* An extended version of the gated clk. This calls fn() before /* An extended version of the gated clk. This calls fn_en()/fn_dis
* disabling the clock. We use this to turn off PHYs etc. */ * before enabling/disabling the clock. We use this to turn on/off
* PHYs etc. */
struct clk_gate_fn { struct clk_gate_fn {
struct clk_gate gate; struct clk_gate gate;
void (*fn)(void); void (*fn_en)(void);
void (*fn_dis)(void);
}; };
#define to_clk_gate_fn(_gate) container_of(_gate, struct clk_gate_fn, gate) #define to_clk_gate_fn(_gate) container_of(_gate, struct clk_gate_fn, gate)
#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw)
static int clk_gate_fn_enable(struct clk_hw *hw)
{
struct clk_gate *gate = to_clk_gate(hw);
struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate);
int ret;
ret = clk_gate_ops.enable(hw);
if (!ret && gate_fn->fn_en)
gate_fn->fn_en();
return ret;
}
static void clk_gate_fn_disable(struct clk_hw *hw) static void clk_gate_fn_disable(struct clk_hw *hw)
{ {
struct clk_gate *gate = to_clk_gate(hw); struct clk_gate *gate = to_clk_gate(hw);
struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate); struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate);
if (gate_fn->fn) if (gate_fn->fn_dis)
gate_fn->fn(); gate_fn->fn_dis();
clk_gate_ops.disable(hw); clk_gate_ops.disable(hw);
} }
...@@ -135,7 +166,7 @@ static struct clk __init *clk_register_gate_fn(struct device *dev, ...@@ -135,7 +166,7 @@ static struct clk __init *clk_register_gate_fn(struct device *dev,
const char *parent_name, unsigned long flags, const char *parent_name, unsigned long flags,
void __iomem *reg, u8 bit_idx, void __iomem *reg, u8 bit_idx,
u8 clk_gate_flags, spinlock_t *lock, u8 clk_gate_flags, spinlock_t *lock,
void (*fn)(void)) void (*fn_en)(void), void (*fn_dis)(void))
{ {
struct clk_gate_fn *gate_fn; struct clk_gate_fn *gate_fn;
struct clk *clk; struct clk *clk;
...@@ -159,11 +190,14 @@ static struct clk __init *clk_register_gate_fn(struct device *dev, ...@@ -159,11 +190,14 @@ static struct clk __init *clk_register_gate_fn(struct device *dev,
gate_fn->gate.flags = clk_gate_flags; gate_fn->gate.flags = clk_gate_flags;
gate_fn->gate.lock = lock; gate_fn->gate.lock = lock;
gate_fn->gate.hw.init = &init; gate_fn->gate.hw.init = &init;
gate_fn->fn = fn; gate_fn->fn_en = fn_en;
gate_fn->fn_dis = fn_dis;
/* ops is the gate ops, but with our disable function */ /* ops is the gate ops, but with our enable/disable functions */
if (clk_gate_fn_ops.disable != clk_gate_fn_disable) { if (clk_gate_fn_ops.enable != clk_gate_fn_enable ||
clk_gate_fn_ops.disable != clk_gate_fn_disable) {
clk_gate_fn_ops = clk_gate_ops; clk_gate_fn_ops = clk_gate_ops;
clk_gate_fn_ops.enable = clk_gate_fn_enable;
clk_gate_fn_ops.disable = clk_gate_fn_disable; clk_gate_fn_ops.disable = clk_gate_fn_disable;
} }
...@@ -187,11 +221,12 @@ static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx) ...@@ -187,11 +221,12 @@ static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx)
static struct clk __init *kirkwood_register_gate_fn(const char *name, static struct clk __init *kirkwood_register_gate_fn(const char *name,
u8 bit_idx, u8 bit_idx,
void (*fn)(void)) void (*fn_en)(void),
void (*fn_dis)(void))
{ {
return clk_register_gate_fn(NULL, name, "tclk", 0, return clk_register_gate_fn(NULL, name, "tclk", 0,
(void __iomem *)CLOCK_GATING_CTRL, (void __iomem *)CLOCK_GATING_CTRL,
bit_idx, 0, &gating_lock, fn); bit_idx, 0, &gating_lock, fn_en, fn_dis);
} }
static struct clk *ge0, *ge1; static struct clk *ge0, *ge1;
...@@ -208,18 +243,18 @@ void __init kirkwood_clk_init(void) ...@@ -208,18 +243,18 @@ void __init kirkwood_clk_init(void)
ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0); ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0);
ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1); ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1);
sata0 = kirkwood_register_gate_fn("sata0", CGC_BIT_SATA0, sata0 = kirkwood_register_gate_fn("sata0", CGC_BIT_SATA0,
disable_sata0); enable_sata0, disable_sata0);
sata1 = kirkwood_register_gate_fn("sata1", CGC_BIT_SATA1, sata1 = kirkwood_register_gate_fn("sata1", CGC_BIT_SATA1,
disable_sata1); enable_sata1, disable_sata1);
usb0 = kirkwood_register_gate("usb0", CGC_BIT_USB0); usb0 = kirkwood_register_gate("usb0", CGC_BIT_USB0);
sdio = kirkwood_register_gate("sdio", CGC_BIT_SDIO); sdio = kirkwood_register_gate("sdio", CGC_BIT_SDIO);
crypto = kirkwood_register_gate("crypto", CGC_BIT_CRYPTO); crypto = kirkwood_register_gate("crypto", CGC_BIT_CRYPTO);
xor0 = kirkwood_register_gate("xor0", CGC_BIT_XOR0); xor0 = kirkwood_register_gate("xor0", CGC_BIT_XOR0);
xor1 = kirkwood_register_gate("xor1", CGC_BIT_XOR1); xor1 = kirkwood_register_gate("xor1", CGC_BIT_XOR1);
pex0 = kirkwood_register_gate_fn("pex0", CGC_BIT_PEX0, pex0 = kirkwood_register_gate_fn("pex0", CGC_BIT_PEX0,
disable_pcie0); NULL, disable_pcie0);
pex1 = kirkwood_register_gate_fn("pex1", CGC_BIT_PEX1, pex1 = kirkwood_register_gate_fn("pex1", CGC_BIT_PEX1,
disable_pcie1); NULL, disable_pcie1);
audio = kirkwood_register_gate("audio", CGC_BIT_AUDIO); audio = kirkwood_register_gate("audio", CGC_BIT_AUDIO);
kirkwood_register_gate("tdm", CGC_BIT_TDM); kirkwood_register_gate("tdm", CGC_BIT_TDM);
kirkwood_register_gate("tsu", CGC_BIT_TSU); kirkwood_register_gate("tsu", CGC_BIT_TSU);
...@@ -241,6 +276,11 @@ void __init kirkwood_clk_init(void) ...@@ -241,6 +276,11 @@ void __init kirkwood_clk_init(void)
orion_clkdev_add("0", "pcie", pex0); orion_clkdev_add("0", "pcie", pex0);
orion_clkdev_add("1", "pcie", pex1); orion_clkdev_add("1", "pcie", pex1);
orion_clkdev_add(NULL, "kirkwood-i2s", audio); orion_clkdev_add(NULL, "kirkwood-i2s", audio);
/* Marvell says runit is used by SPI, UART, NAND, TWSI, ...,
* so should never be gated.
*/
clk_prepare_enable(runit);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -162,7 +162,7 @@ enum mac_oui { ...@@ -162,7 +162,7 @@ enum mac_oui {
static void __init update_fec_mac_prop(enum mac_oui oui) static void __init update_fec_mac_prop(enum mac_oui oui)
{ {
struct device_node *np, *from = NULL; struct device_node *np, *from = NULL;
struct property *oldmac, *newmac; struct property *newmac;
const u32 *ocotp = mxs_get_ocotp(); const u32 *ocotp = mxs_get_ocotp();
u8 *macaddr; u8 *macaddr;
u32 val; u32 val;
...@@ -208,11 +208,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui) ...@@ -208,11 +208,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui)
macaddr[4] = (val >> 8) & 0xff; macaddr[4] = (val >> 8) & 0xff;
macaddr[5] = (val >> 0) & 0xff; macaddr[5] = (val >> 0) & 0xff;
oldmac = of_find_property(np, newmac->name, NULL); prom_update_property(np, newmac);
if (oldmac)
prom_update_property(np, newmac, oldmac);
else
prom_add_property(np, newmac);
} }
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/mfd/tps6586x.h> #include <linux/mfd/tps6586x.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_i2c.h> #include <linux/of_i2c.h>
...@@ -34,7 +35,9 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = { ...@@ -34,7 +35,9 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = {
}; };
static struct regulator_init_data ldo0_data = { static struct regulator_init_data ldo0_data = {
.supply_regulator = "vdd_sm2",
.constraints = { .constraints = {
.name = "vdd_ldo0",
.min_uV = 3300 * 1000, .min_uV = 3300 * 1000,
.max_uV = 3300 * 1000, .max_uV = 3300 * 1000,
.valid_modes_mask = (REGULATOR_MODE_NORMAL | .valid_modes_mask = (REGULATOR_MODE_NORMAL |
...@@ -48,9 +51,11 @@ static struct regulator_init_data ldo0_data = { ...@@ -48,9 +51,11 @@ static struct regulator_init_data ldo0_data = {
.consumer_supplies = tps658621_ldo0_supply, .consumer_supplies = tps658621_ldo0_supply,
}; };
#define HARMONY_REGULATOR_INIT(_id, _minmv, _maxmv) \ #define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv) \
static struct regulator_init_data _id##_data = { \ static struct regulator_init_data _id##_data = { \
.supply_regulator = _supply, \
.constraints = { \ .constraints = { \
.name = _name, \
.min_uV = (_minmv)*1000, \ .min_uV = (_minmv)*1000, \
.max_uV = (_maxmv)*1000, \ .max_uV = (_maxmv)*1000, \
.valid_modes_mask = (REGULATOR_MODE_NORMAL | \ .valid_modes_mask = (REGULATOR_MODE_NORMAL | \
...@@ -61,18 +66,18 @@ static struct regulator_init_data ldo0_data = { ...@@ -61,18 +66,18 @@ static struct regulator_init_data ldo0_data = {
}, \ }, \
} }
HARMONY_REGULATOR_INIT(sm0, 725, 1500); HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500);
HARMONY_REGULATOR_INIT(sm1, 725, 1500); HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500);
HARMONY_REGULATOR_INIT(sm2, 3000, 4550); HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550);
HARMONY_REGULATOR_INIT(ldo1, 725, 1500); HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500);
HARMONY_REGULATOR_INIT(ldo2, 725, 1500); HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500);
HARMONY_REGULATOR_INIT(ldo3, 1250, 3300); HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300);
HARMONY_REGULATOR_INIT(ldo4, 1700, 2475); HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475);
HARMONY_REGULATOR_INIT(ldo5, 1250, 3300); HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300);
HARMONY_REGULATOR_INIT(ldo6, 1250, 3300); HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300);
HARMONY_REGULATOR_INIT(ldo7, 1250, 3300); HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300);
HARMONY_REGULATOR_INIT(ldo8, 1250, 3300); HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300);
HARMONY_REGULATOR_INIT(ldo9, 1250, 3300); HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300);
#define TPS_REG(_id, _data) \ #define TPS_REG(_id, _data) \
{ \ { \
...@@ -115,6 +120,8 @@ static struct i2c_board_info __initdata harmony_regulators[] = { ...@@ -115,6 +120,8 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
int __init harmony_regulator_init(void) int __init harmony_regulator_init(void)
{ {
if (machine_is_harmony()) { if (machine_is_harmony()) {
regulator_register_always_on(0, "vdd_sys",
NULL, 0, 5000000);
i2c_register_board_info(3, harmony_regulators, 1); i2c_register_board_info(3, harmony_regulators, 1);
} else { /* Harmony, booted using device tree */ } else { /* Harmony, booted using device tree */
struct device_node *np; struct device_node *np;
......
...@@ -1127,6 +1127,10 @@ static int mv_probe(struct platform_device *pdev) ...@@ -1127,6 +1127,10 @@ static int mv_probe(struct platform_device *pdev)
crypto_unregister_alg(&mv_aes_alg_ecb); crypto_unregister_alg(&mv_aes_alg_ecb);
err_irq: err_irq:
free_irq(irq, cp); free_irq(irq, cp);
if (!IS_ERR(cp->clk)) {
clk_disable_unprepare(cp->clk);
clk_put(cp->clk);
}
err_thread: err_thread:
kthread_stop(cp->queue_th); kthread_stop(cp->queue_th);
err_unmap_sram: err_unmap_sram:
......
...@@ -839,6 +839,10 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -839,6 +839,10 @@ static int __init mvsd_probe(struct platform_device *pdev)
if (r) if (r)
release_resource(r); release_resource(r);
if (mmc) if (mmc)
if (!IS_ERR_OR_NULL(host->clk)) {
clk_disable_unprepare(host->clk);
clk_put(host->clk);
}
mmc_free_host(mmc); mmc_free_host(mmc);
return ret; return ret;
......
...@@ -183,6 +183,10 @@ static int __init orion_nand_probe(struct platform_device *pdev) ...@@ -183,6 +183,10 @@ static int __init orion_nand_probe(struct platform_device *pdev)
return 0; return 0;
no_dev: no_dev:
if (!IS_ERR(clk)) {
clk_disable_unprepare(clk);
clk_put(clk);
}
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
iounmap(io_base); iounmap(io_base);
no_res: no_res:
...@@ -214,7 +218,7 @@ static int __devexit orion_nand_remove(struct platform_device *pdev) ...@@ -214,7 +218,7 @@ static int __devexit orion_nand_remove(struct platform_device *pdev)
#ifdef CONFIG_OF #ifdef CONFIG_OF
static struct of_device_id orion_nand_of_match_table[] = { static struct of_device_id orion_nand_of_match_table[] = {
{ .compatible = "mrvl,orion-nand", }, { .compatible = "marvell,orion-nand", },
{}, {},
}; };
#endif #endif
......
...@@ -2983,6 +2983,12 @@ static int mv643xx_eth_probe(struct platform_device *pdev) ...@@ -2983,6 +2983,12 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
return 0; return 0;
out: out:
#if defined(CONFIG_HAVE_CLK)
if (!IS_ERR(mp->clk)) {
clk_disable_unprepare(mp->clk);
clk_put(mp->clk);
}
#endif
free_netdev(dev); free_netdev(dev);
return err; return err;
......
...@@ -297,7 +297,7 @@ static int __exit mv_rtc_remove(struct platform_device *pdev) ...@@ -297,7 +297,7 @@ static int __exit mv_rtc_remove(struct platform_device *pdev)
#ifdef CONFIG_OF #ifdef CONFIG_OF
static struct of_device_id rtc_mv_of_match_table[] = { static struct of_device_id rtc_mv_of_match_table[] = {
{ .compatible = "mrvl,orion-rtc", }, { .compatible = "marvell,orion-rtc", },
{} {}
}; };
#endif #endif
......
...@@ -283,6 +283,10 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -283,6 +283,10 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
err4: err4:
usb_put_hcd(hcd); usb_put_hcd(hcd);
err3: err3:
if (!IS_ERR(clk)) {
clk_disable_unprepare(clk);
clk_put(clk);
}
iounmap(regs); iounmap(regs);
err2: err2:
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
......
...@@ -458,7 +458,13 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev) ...@@ -458,7 +458,13 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev)
} }
clk_prepare_enable(priv->clk); clk_prepare_enable(priv->clk);
return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); err = snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai);
if (!err)
return 0;
dev_err(&pdev->dev, "snd_soc_register_dai failed\n");
clk_disable_unprepare(priv->clk);
clk_put(priv->clk);
err_ioremap: err_ioremap:
iounmap(priv->io); iounmap(priv->io);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment