Skip to content

Commit

Permalink
Merge tag 'mvebu_fixes_for_v3.9' of git://git.infradead.org/users/jco…
Browse files Browse the repository at this point in the history
…oper/linux into fixes

mvebu fixes for v3.9 from Jason Cooper <jason@lakedaemon.net>:

The first four patches:

  89c58c1 rtc: rtc-mv: Add support for clk to avoid lockups
  de88747 gpio: mvebu: Add clk support to prevent lockup
  7bf5b40 ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
  93fff4c ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency

are Cc'd to stable since they were held over from the previous merge window.

The rest are a small collection of fixes and a couple of devicetree conversion
catchups.

* tag 'mvebu_fixes_for_v3.9' of git://git.infradead.org/users/jcooper/linux:
  arm: mach-orion5x: fix typo in compatible string of a .dts file
  arm: mvebu: fix address-cells in mpic DT node
  arm: plat-orion: fix address decoding when > 4GB is used
  arm: mvebu: Reduce reg-io-width with UARTs
  ARM: Dove: add RTC device node
  arm: mvebu: enable the USB ports on Armada 370 Reference Design board
  ARM: dove: drop "select COMMON_CLK_DOVE"
  rtc: rtc-mv: Add support for clk to avoid lockups
  gpio: mvebu: Add clk support to prevent lockup
  ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
  ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Mar 11, 2013
2 parents 769aca0 + b2d5722 commit 7546152
Show file tree
Hide file tree
Showing 27 changed files with 75 additions and 40 deletions.
1 change: 0 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ config ARCH_IXP4XX
config ARCH_DOVE
bool "Marvell Dove"
select ARCH_REQUIRE_GPIOLIB
select COMMON_CLK_DOVE
select CPU_V7
select GENERIC_CLOCKEVENTS
select MIGHT_HAVE_PCI
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/armada-370-rd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,13 @@
status = "okay";
/* No CD or WP GPIOs */
};

usb@d0050000 {
status = "okay";
};

usb@d0051000 {
status = "okay";
};
};
};
5 changes: 2 additions & 3 deletions arch/arm/boot/dts/armada-370-xp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
mpic: interrupt-controller@d0020000 {
compatible = "marvell,mpic";
#interrupt-cells = <1>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-controller;
};
Expand All @@ -54,15 +53,15 @@
reg = <0xd0012000 0x100>;
reg-shift = <2>;
interrupts = <41>;
reg-io-width = <4>;
reg-io-width = <1>;
status = "disabled";
};
serial@d0012100 {
compatible = "snps,dw-apb-uart";
reg = <0xd0012100 0x100>;
reg-shift = <2>;
interrupts = <42>;
reg-io-width = <4>;
reg-io-width = <1>;
status = "disabled";
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/armada-xp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
reg = <0xd0012200 0x100>;
reg-shift = <2>;
interrupts = <43>;
reg-io-width = <4>;
reg-io-width = <1>;
status = "disabled";
};
serial@d0012300 {
compatible = "snps,dw-apb-uart";
reg = <0xd0012300 0x100>;
reg-shift = <2>;
interrupts = <44>;
reg-io-width = <4>;
reg-io-width = <1>;
status = "disabled";
};

Expand Down
5 changes: 5 additions & 0 deletions arch/arm/boot/dts/dove.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@
status = "disabled";
};

rtc@d8500 {
compatible = "marvell,orion-rtc";
reg = <0xd8500 0x20>;
};

crypto: crypto@30000 {
compatible = "marvell,orion-crypto";
reg = <0x30000 0x10000>,
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/kirkwood-dns320.dts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@

ocp@f1000000 {
serial@12000 {
clock-frequency = <166666667>;
status = "okay";
};

serial@12100 {
clock-frequency = <166666667>;
status = "okay";
};
};
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-dns325.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
};
};
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-dockstar.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-dreamplug.dts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-goflexnet.dts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-ib62x0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-iconnect.dts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

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

serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

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

serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-lschlv2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

ocp@f1000000 {
serial@12000 {
clock-frequency = <166666667>;
status = "okay";
};
};
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-lsxhl.dts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
};
};
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/kirkwood-mplcec4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
};

serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

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

serial@12000 {
clock-frequency = <166666667>;
status = "okay";
};

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

serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/kirkwood-openblocks_a6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@

ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

serial@12100 {
clock-frequency = <200000000>;
status = "ok";
};

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

serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

Expand Down
5 changes: 3 additions & 2 deletions arch/arm/boot/dts/kirkwood.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <35>, <36>, <37>, <38>;
clocks = <&gate_clk 7>;
};

gpio1: gpio@10140 {
Expand All @@ -49,6 +50,7 @@
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <39>, <40>, <41>;
clocks = <&gate_clk 7>;
};

serial@12000 {
Expand All @@ -57,7 +59,6 @@
reg-shift = <2>;
interrupts = <33>;
clocks = <&gate_clk 7>;
/* set clock-frequency in board dts */
status = "disabled";
};

Expand All @@ -67,14 +68,14 @@
reg-shift = <2>;
interrupts = <34>;
clocks = <&gate_clk 7>;
/* set clock-frequency in board dts */
status = "disabled";
};

rtc@10300 {
compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
reg = <0x10300 0x20>;
interrupts = <53>;
clocks = <&gate_clk 7>;
};

spi@10600 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/ {
model = "LaCie Ethernet Disk mini V2";
compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x";
compatible = "lacie,ethernet-disk-mini-v2", "marvell,orion5x-88f5182", "marvell,orion5x";

memory {
reg = <0x00000000 0x4000000>; /* 64 MB */
Expand Down
25 changes: 18 additions & 7 deletions arch/arm/mach-kirkwood/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ static void __init kirkwood_legacy_clk_init(void)

struct device_node *np = of_find_compatible_node(
NULL, NULL, "marvell,kirkwood-gating-clock");

struct of_phandle_args clkspec;
struct clk *clk;

clkspec.np = np;
clkspec.args_count = 1;

clkspec.args[0] = CGC_BIT_GE0;
orion_clkdev_add(NULL, "mv643xx_eth_port.0",
of_clk_get_from_provider(&clkspec));

clkspec.args[0] = CGC_BIT_PEX0;
orion_clkdev_add("0", "pcie",
of_clk_get_from_provider(&clkspec));
Expand All @@ -59,9 +55,24 @@ static void __init kirkwood_legacy_clk_init(void)
orion_clkdev_add("1", "pcie",
of_clk_get_from_provider(&clkspec));

clkspec.args[0] = CGC_BIT_GE1;
orion_clkdev_add(NULL, "mv643xx_eth_port.1",
clkspec.args[0] = CGC_BIT_SDIO;
orion_clkdev_add(NULL, "mvsdio",
of_clk_get_from_provider(&clkspec));

/*
* The ethernet interfaces forget the MAC address assigned by
* u-boot if the clocks are turned off. Until proper DT support
* is available we always enable them for now.
*/
clkspec.args[0] = CGC_BIT_GE0;
clk = of_clk_get_from_provider(&clkspec);
orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk);
clk_prepare_enable(clk);

clkspec.args[0] = CGC_BIT_GE1;
clk = of_clk_get_from_provider(&clkspec);
orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk);
clk_prepare_enable(clk);
}

static void __init kirkwood_of_clk_init(void)
Expand Down
7 changes: 5 additions & 2 deletions arch/arm/plat-orion/addr-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i));

/*
* Chip select enabled?
* We only take care of entries for which the chip
* select is enabled, and that don't have high base
* address bits set (devices can only access the first
* 32 bits of the memory).
*/
if (size & 1) {
if ((size & 1) && !(base & 0xF)) {
struct mbus_dram_window *w;

w = &orion_mbus_dram_info.cs[cs++];
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpio/gpio-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <linux/io.h>
#include <linux/of_irq.h>
#include <linux/of_device.h>
#include <linux/clk.h>
#include <linux/pinctrl/consumer.h>

/*
Expand Down Expand Up @@ -496,6 +497,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
struct resource *res;
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
struct clk *clk;
unsigned int ngpios;
int soc_variant;
int i, cpu, id;
Expand Down Expand Up @@ -529,6 +531,11 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
return id;
}

clk = devm_clk_get(&pdev->dev, NULL);
/* Not all SoCs require a clock.*/
if (!IS_ERR(clk))
clk_prepare_enable(clk);

mvchip->soc_variant = soc_variant;
mvchip->chip.label = dev_name(&pdev->dev);
mvchip->chip.dev = &pdev->dev;
Expand Down
Loading

0 comments on commit 7546152

Please sign in to comment.