From bab2dcfc1f75024ea4ce05fd9dafb9881fd62379 Mon Sep 17 00:00:00 2001 From: Jamie Lentin Date: Wed, 18 Apr 2012 11:06:42 +0100 Subject: [PATCH] --- yaml --- r: 303513 b: refs/heads/master c: 858156bd6c24f12c3fca94bceacb05fa9a2daef4 h: refs/heads/master i: 303511: fedb893392b8f2f145824a2bfcf49d842f19b62c v: v3 --- [refs] | 2 +- trunk/arch/arm/boot/dts/kirkwood.dtsi | 15 ++++++++++++++- trunk/arch/arm/mach-kirkwood/common.c | 12 ++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index eb00f0e4015f..10cb5f3a382b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0fabf722c9dc73a3eed24ce166476ddb00eda1e +refs/heads/master: 858156bd6c24f12c3fca94bceacb05fa9a2daef4 diff --git a/trunk/arch/arm/boot/dts/kirkwood.dtsi b/trunk/arch/arm/boot/dts/kirkwood.dtsi index 3474ef890945..926528b81baa 100644 --- a/trunk/arch/arm/boot/dts/kirkwood.dtsi +++ b/trunk/arch/arm/boot/dts/kirkwood.dtsi @@ -5,7 +5,7 @@ ocp@f1000000 { compatible = "simple-bus"; - ranges = <0 0xf1000000 0x1000000>; + ranges = <0 0xf1000000 0x4000000>; #address-cells = <1>; #size-cells = <1>; @@ -32,5 +32,18 @@ reg = <0x10300 0x20>; interrupts = <53>; }; + + nand@3000000 { + #address-cells = <1>; + #size-cells = <1>; + cle = <0>; + ale = <1>; + bank-width = <1>; + compatible = "mrvl,orion-nand"; + reg = <0x3000000 0x400>; + chip-delay = <25>; + /* set partition map and/or chip-delay in board dts */ + status = "disabled"; + }; }; }; diff --git a/trunk/arch/arm/mach-kirkwood/common.c b/trunk/arch/arm/mach-kirkwood/common.c index a02cae881f2f..3ad037385a5e 100644 --- a/trunk/arch/arm/mach-kirkwood/common.c +++ b/trunk/arch/arm/mach-kirkwood/common.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -482,6 +483,9 @@ static int __init kirkwood_clock_gate(void) unsigned int curr = readl(CLOCK_GATING_CTRL); u32 dev, rev; +#ifdef CONFIG_OF + struct device_node *np; +#endif kirkwood_pcie_id(&dev, &rev); printk(KERN_DEBUG "Gating clock of unused units\n"); printk(KERN_DEBUG "before: 0x%08x\n", curr); @@ -489,6 +493,14 @@ static int __init kirkwood_clock_gate(void) /* Make sure those units are accessible */ writel(curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0 | CGC_PEX1, CLOCK_GATING_CTRL); +#ifdef CONFIG_OF + np = of_find_compatible_node(NULL, NULL, "mrvl,orion-nand"); + if (np && of_device_is_available(np)) { + kirkwood_clk_ctrl |= CGC_RUNIT; + of_node_put(np); + } +#endif + /* For SATA: first shutdown the phy */ if (!(kirkwood_clk_ctrl & CGC_SATA0)) { /* Disable PLL and IVREF */