Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'v3.5-rc7-fixes' of git://github.com/lunn/linux into fixes

From Andrew Lunn <andrew@lunn.ch>:

* 'v3.5-rc7-fixes' of git://github.com/lunn/linux:
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+98 -30
+2 -2
Documentation/devicetree/bindings/mtd/orion-nand.txt
··· 1 1 NAND support for Marvell Orion SoC platforms 2 2 3 3 Required properties: 4 - - compatible : "mrvl,orion-nand". 4 + - compatible : "marvell,orion-nand". 5 5 - reg : Base physical address of the NAND and length of memory mapped 6 6 region 7 7 ··· 24 24 ale = <1>; 25 25 bank-width = <1>; 26 26 chip-delay = <25>; 27 - compatible = "mrvl,orion-nand"; 27 + compatible = "marvell,orion-nand"; 28 28 reg = <0xf4000000 0x400>; 29 29 30 30 partition@0 {
+1 -1
arch/arm/boot/dts/kirkwood-dns320.dts
··· 4 4 5 5 / { 6 6 model = "D-Link DNS-320 NAS (Rev A1)"; 7 - compatible = "dlink,dns-320-a1", "dlink,dns-320", "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 7 + compatible = "dlink,dns-320-a1", "dlink,dns-320", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 8 9 9 memory { 10 10 device_type = "memory";
+1 -1
arch/arm/boot/dts/kirkwood-dns325.dts
··· 4 4 5 5 / { 6 6 model = "D-Link DNS-325 NAS (Rev A1)"; 7 - compatible = "dlink,dns-325-a1", "dlink,dns-325", "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 7 + compatible = "dlink,dns-325-a1", "dlink,dns-325", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 8 9 9 memory { 10 10 device_type = "memory";
+1 -1
arch/arm/boot/dts/kirkwood-dreamplug.dts
··· 4 4 5 5 / { 6 6 model = "Globalscale Technologies Dreamplug"; 7 - compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 7 + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 8 9 9 memory { 10 10 device_type = "memory";
+1 -1
arch/arm/boot/dts/kirkwood-ib62x0.dts
··· 4 4 5 5 / { 6 6 model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; 7 - compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 7 + compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 8 9 9 memory { 10 10 device_type = "memory";
+1 -1
arch/arm/boot/dts/kirkwood-iconnect.dts
··· 4 4 5 5 / { 6 6 model = "Iomega Iconnect"; 7 - compatible = "iom,iconnect-1.1", "iom,iconnect", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 7 + compatible = "iom,iconnect-1.1", "iom,iconnect", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 8 9 9 memory { 10 10 device_type = "memory";
+3 -3
arch/arm/boot/dts/kirkwood.dtsi
··· 1 1 /include/ "skeleton.dtsi" 2 2 3 3 / { 4 - compatible = "mrvl,kirkwood"; 4 + compatible = "marvell,kirkwood"; 5 5 6 6 ocp@f1000000 { 7 7 compatible = "simple-bus"; ··· 28 28 }; 29 29 30 30 rtc@10300 { 31 - compatible = "mrvl,kirkwood-rtc", "mrvl,orion-rtc"; 31 + compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; 32 32 reg = <0x10300 0x20>; 33 33 interrupts = <53>; 34 34 }; ··· 39 39 cle = <0>; 40 40 ale = <1>; 41 41 bank-width = <1>; 42 - compatible = "mrvl,orion-nand"; 42 + compatible = "marvell,orion-nand"; 43 43 reg = <0x3000000 0x400>; 44 44 chip-delay = <25>; 45 45 /* set partition map and/or chip-delay in board dts */
+2 -2
arch/arm/mach-dove/common.c
··· 101 101 ****************************************************************************/ 102 102 void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) 103 103 { 104 - orion_ge00_init(eth_data, 105 - DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM, 0); 104 + orion_ge00_init(eth_data, DOVE_GE00_PHYS_BASE, 105 + IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR); 106 106 } 107 107 108 108 /*****************************************************************************
+55 -15
arch/arm/mach-kirkwood/common.c
··· 67 67 * CLK tree 68 68 ****************************************************************************/ 69 69 70 + static void enable_sata0(void) 71 + { 72 + /* Enable PLL and IVREF */ 73 + writel(readl(SATA0_PHY_MODE_2) | 0xf, SATA0_PHY_MODE_2); 74 + /* Enable PHY */ 75 + writel(readl(SATA0_IF_CTRL) & ~0x200, SATA0_IF_CTRL); 76 + } 77 + 70 78 static void disable_sata0(void) 71 79 { 72 80 /* Disable PLL and IVREF */ 73 81 writel(readl(SATA0_PHY_MODE_2) & ~0xf, SATA0_PHY_MODE_2); 74 82 /* Disable PHY */ 75 83 writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL); 84 + } 85 + 86 + static void enable_sata1(void) 87 + { 88 + /* Enable PLL and IVREF */ 89 + writel(readl(SATA1_PHY_MODE_2) | 0xf, SATA1_PHY_MODE_2); 90 + /* Enable PHY */ 91 + writel(readl(SATA1_IF_CTRL) & ~0x200, SATA1_IF_CTRL); 76 92 } 77 93 78 94 static void disable_sata1(void) ··· 123 107 } 124 108 } 125 109 126 - /* An extended version of the gated clk. This calls fn() before 127 - * disabling the clock. We use this to turn off PHYs etc. */ 110 + /* An extended version of the gated clk. This calls fn_en()/fn_dis 111 + * before enabling/disabling the clock. We use this to turn on/off 112 + * PHYs etc. */ 128 113 struct clk_gate_fn { 129 114 struct clk_gate gate; 130 - void (*fn)(void); 115 + void (*fn_en)(void); 116 + void (*fn_dis)(void); 131 117 }; 132 118 133 119 #define to_clk_gate_fn(_gate) container_of(_gate, struct clk_gate_fn, gate) 134 120 #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) 121 + 122 + static int clk_gate_fn_enable(struct clk_hw *hw) 123 + { 124 + struct clk_gate *gate = to_clk_gate(hw); 125 + struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate); 126 + int ret; 127 + 128 + ret = clk_gate_ops.enable(hw); 129 + if (!ret && gate_fn->fn_en) 130 + gate_fn->fn_en(); 131 + 132 + return ret; 133 + } 135 134 136 135 static void clk_gate_fn_disable(struct clk_hw *hw) 137 136 { 138 137 struct clk_gate *gate = to_clk_gate(hw); 139 138 struct clk_gate_fn *gate_fn = to_clk_gate_fn(gate); 140 139 141 - if (gate_fn->fn) 142 - gate_fn->fn(); 140 + if (gate_fn->fn_dis) 141 + gate_fn->fn_dis(); 143 142 144 143 clk_gate_ops.disable(hw); 145 144 } ··· 166 135 const char *parent_name, unsigned long flags, 167 136 void __iomem *reg, u8 bit_idx, 168 137 u8 clk_gate_flags, spinlock_t *lock, 169 - void (*fn)(void)) 138 + void (*fn_en)(void), void (*fn_dis)(void)) 170 139 { 171 140 struct clk_gate_fn *gate_fn; 172 141 struct clk *clk; ··· 190 159 gate_fn->gate.flags = clk_gate_flags; 191 160 gate_fn->gate.lock = lock; 192 161 gate_fn->gate.hw.init = &init; 193 - gate_fn->fn = fn; 162 + gate_fn->fn_en = fn_en; 163 + gate_fn->fn_dis = fn_dis; 194 164 195 - /* ops is the gate ops, but with our disable function */ 196 - if (clk_gate_fn_ops.disable != clk_gate_fn_disable) { 165 + /* ops is the gate ops, but with our enable/disable functions */ 166 + if (clk_gate_fn_ops.enable != clk_gate_fn_enable || 167 + clk_gate_fn_ops.disable != clk_gate_fn_disable) { 197 168 clk_gate_fn_ops = clk_gate_ops; 169 + clk_gate_fn_ops.enable = clk_gate_fn_enable; 198 170 clk_gate_fn_ops.disable = clk_gate_fn_disable; 199 171 } 200 172 ··· 221 187 222 188 static struct clk __init *kirkwood_register_gate_fn(const char *name, 223 189 u8 bit_idx, 224 - void (*fn)(void)) 190 + void (*fn_en)(void), 191 + void (*fn_dis)(void)) 225 192 { 226 193 return clk_register_gate_fn(NULL, name, "tclk", 0, 227 194 (void __iomem *)CLOCK_GATING_CTRL, 228 - bit_idx, 0, &gating_lock, fn); 195 + bit_idx, 0, &gating_lock, fn_en, fn_dis); 229 196 } 230 197 231 198 static struct clk *ge0, *ge1; ··· 243 208 ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0); 244 209 ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1); 245 210 sata0 = kirkwood_register_gate_fn("sata0", CGC_BIT_SATA0, 246 - disable_sata0); 211 + enable_sata0, disable_sata0); 247 212 sata1 = kirkwood_register_gate_fn("sata1", CGC_BIT_SATA1, 248 - disable_sata1); 213 + enable_sata1, disable_sata1); 249 214 usb0 = kirkwood_register_gate("usb0", CGC_BIT_USB0); 250 215 sdio = kirkwood_register_gate("sdio", CGC_BIT_SDIO); 251 216 crypto = kirkwood_register_gate("crypto", CGC_BIT_CRYPTO); 252 217 xor0 = kirkwood_register_gate("xor0", CGC_BIT_XOR0); 253 218 xor1 = kirkwood_register_gate("xor1", CGC_BIT_XOR1); 254 219 pex0 = kirkwood_register_gate_fn("pex0", CGC_BIT_PEX0, 255 - disable_pcie0); 220 + NULL, disable_pcie0); 256 221 pex1 = kirkwood_register_gate_fn("pex1", CGC_BIT_PEX1, 257 - disable_pcie1); 222 + NULL, disable_pcie1); 258 223 audio = kirkwood_register_gate("audio", CGC_BIT_AUDIO); 259 224 kirkwood_register_gate("tdm", CGC_BIT_TDM); 260 225 kirkwood_register_gate("tsu", CGC_BIT_TSU); ··· 276 241 orion_clkdev_add("0", "pcie", pex0); 277 242 orion_clkdev_add("1", "pcie", pex1); 278 243 orion_clkdev_add(NULL, "kirkwood-i2s", audio); 244 + 245 + /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., 246 + * so should never be gated. 247 + */ 248 + clk_prepare_enable(runit); 279 249 } 280 250 281 251 /*****************************************************************************
+4
drivers/crypto/mv_cesa.c
··· 1098 1098 crypto_unregister_alg(&mv_aes_alg_ecb); 1099 1099 err_irq: 1100 1100 free_irq(irq, cp); 1101 + if (!IS_ERR(cp->clk)) { 1102 + clk_disable_unprepare(cp->clk); 1103 + clk_put(cp->clk); 1104 + } 1101 1105 err_thread: 1102 1106 kthread_stop(cp->queue_th); 1103 1107 err_unmap_sram:
+4
drivers/mmc/host/mvsdio.c
··· 839 839 if (r) 840 840 release_resource(r); 841 841 if (mmc) 842 + if (!IS_ERR_OR_NULL(host->clk)) { 843 + clk_disable_unprepare(host->clk); 844 + clk_put(host->clk); 845 + } 842 846 mmc_free_host(mmc); 843 847 844 848 return ret;
+5 -1
drivers/mtd/nand/orion_nand.c
··· 183 183 return 0; 184 184 185 185 no_dev: 186 + if (!IS_ERR(clk)) { 187 + clk_disable_unprepare(clk); 188 + clk_put(clk); 189 + } 186 190 platform_set_drvdata(pdev, NULL); 187 191 iounmap(io_base); 188 192 no_res: ··· 218 214 219 215 #ifdef CONFIG_OF 220 216 static struct of_device_id orion_nand_of_match_table[] = { 221 - { .compatible = "mrvl,orion-nand", }, 217 + { .compatible = "marvell,orion-nand", }, 222 218 {}, 223 219 }; 224 220 #endif
+6
drivers/net/ethernet/marvell/mv643xx_eth.c
··· 2983 2983 return 0; 2984 2984 2985 2985 out: 2986 + #if defined(CONFIG_HAVE_CLK) 2987 + if (!IS_ERR(mp->clk)) { 2988 + clk_disable_unprepare(mp->clk); 2989 + clk_put(mp->clk); 2990 + } 2991 + #endif 2986 2992 free_netdev(dev); 2987 2993 2988 2994 return err;
+1 -1
drivers/rtc/rtc-mv.c
··· 297 297 298 298 #ifdef CONFIG_OF 299 299 static struct of_device_id rtc_mv_of_match_table[] = { 300 - { .compatible = "mrvl,orion-rtc", }, 300 + { .compatible = "marvell,orion-rtc", }, 301 301 {} 302 302 }; 303 303 #endif
+4
drivers/usb/host/ehci-orion.c
··· 298 298 err4: 299 299 usb_put_hcd(hcd); 300 300 err3: 301 + if (!IS_ERR(clk)) { 302 + clk_disable_unprepare(clk); 303 + clk_put(clk); 304 + } 301 305 iounmap(regs); 302 306 err2: 303 307 release_mem_region(res->start, resource_size(res));
+7 -1
sound/soc/kirkwood/kirkwood-i2s.c
··· 458 458 } 459 459 clk_prepare_enable(priv->clk); 460 460 461 - return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); 461 + err = snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); 462 + if (!err) 463 + return 0; 464 + dev_err(&pdev->dev, "snd_soc_register_dai failed\n"); 465 + 466 + clk_disable_unprepare(priv->clk); 467 + clk_put(priv->clk); 462 468 463 469 err_ioremap: 464 470 iounmap(priv->io);