From b24212fbfba25102cab7b4b1fd2919a58e02ae31 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Tue, 4 Dec 2012 18:04:59 +0100 Subject: arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index cf6c48a..4c0abe8 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -50,17 +50,19 @@ ranges; serial@d0012000 { - compatible = "ns16550"; + compatible = "snps,dw-apb-uart"; reg = <0xd0012000 0x100>; reg-shift = <2>; interrupts = <41>; + reg-io-width = <4>; status = "disabled"; }; serial@d0012100 { - compatible = "ns16550"; + compatible = "snps,dw-apb-uart"; reg = <0xd0012100 0x100>; reg-shift = <2>; interrupts = <42>; + reg-io-width = <4>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 367aa3f..8a85ffe 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -42,17 +42,19 @@ soc { serial@d0012200 { - compatible = "ns16550"; + compatible = "snps,dw-apb-uart"; reg = <0xd0012200 0x100>; reg-shift = <2>; interrupts = <43>; + reg-io-width = <4>; status = "disabled"; }; serial@d0012300 { - compatible = "ns16550"; + compatible = "snps,dw-apb-uart"; reg = <0xd0012300 0x100>; reg-shift = <2>; interrupts = <44>; + reg-io-width = <4>; status = "disabled"; }; diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index a702fb3..b5bc96c 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -33,9 +33,7 @@ CONFIG_MVNETA=y CONFIG_MARVELL_PHY=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_I2C=y -CONFIG_I2C_MV64XXX=y +CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y # CONFIG_USB_SUPPORT is not set -- cgit v0.10.2 From 53dfa8e4aa740cc7a19a39d6d4542f856c6b49ae Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:34 +0100 Subject: ARM: Kirkwood: Fix missing clk for USB device. Without the clock being held by a driver, it gets turned off at a bad time causing the SoC to lockup. This is often during reboot. Signed-off-by: Andrew Lunn Tested-by: Stefan Peter Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 7735cee..110d6cb 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -144,6 +144,7 @@ compatible = "marvell,orion-ehci"; reg = <0x50000 0x1000>; interrupts = <19>; + clocks = <&gate_clk 3>; status = "okay"; }; -- cgit v0.10.2 From 5343527bbfab3f71f64d8ba5d51ce12dec8d82d0 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:35 +0100 Subject: Power: gpio-poweroff: Fix documentation and gpio_is_valid Improve the documentation to clarify level vs edge triggered power off. Improve the comments for level vs edge triggered power off. Make use of gpio_is_valid(). Reported-by: Stephen Warren Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt index 558cdf3..d4eab92 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt @@ -1,4 +1,19 @@ -GPIO line that should be set high/low to power off a device +Driver a GPIO line that can be used to turn the power off. + +The driver supports both level triggered and edge triggered power off. +At driver load time, the driver will request the given gpio line and +install a pm_power_off handler. If the optional properties 'input' is +not found, the GPIO line will be driven in the inactive +state. Otherwise its configured as an input. + +When the pm_power_off is called, the gpio is configured as an output, +and drive active, so triggering a level triggered power off +condition. This will also cause an inactive->active edge condition, so +triggering positive edge triggered power off. After a delay of 100ms, +the GPIO is set to inactive, thus causing an active->inactive edge, +triggering negative edge triggered power off. After another 100ms +delay the GPIO is driver active again. If the power is still on and +the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted. Required properties: - compatible : should be "gpio-poweroff". @@ -13,10 +28,9 @@ Optional properties: property is not specified, the GPIO is initialized as an output in its inactive state. - Examples: gpio-poweroff { compatible = "gpio-poweroff"; - gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ + gpios = <&gpio 4 0>; }; diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c index 0491e53..adc943b 100644 --- a/drivers/power/reset/gpio-poweroff.c +++ b/drivers/power/reset/gpio-poweroff.c @@ -29,15 +29,16 @@ static int gpio_active_low; static void gpio_poweroff_do_poweroff(void) { - BUG_ON(gpio_num == -1); + BUG_ON(!gpio_is_valid(gpio_num)); - /* drive it active */ + /* drive it active, also inactive->active edge */ gpio_direction_output(gpio_num, !gpio_active_low); mdelay(100); - /* rising edge or drive inactive */ + /* drive inactive, also active->inactive edge */ gpio_set_value(gpio_num, gpio_active_low); mdelay(100); - /* falling edge */ + + /* drive it active, also inactive->active edge */ gpio_set_value(gpio_num, !gpio_active_low); /* give it some time */ @@ -60,15 +61,12 @@ static int __devinit gpio_poweroff_probe(struct platform_device *pdev) } gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); - if (gpio_num < 0) { - pr_err("%s: Could not get GPIO configuration: %d", - __func__, gpio_num); - return -ENODEV; - } + if (!gpio_is_valid(gpio_num)) + return gpio_num; + gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; - if (of_get_property(pdev->dev.of_node, "input", NULL)) - input = true; + input = of_property_read_bool(pdev->dev.of_node, "input"); ret = gpio_request(gpio_num, "poweroff-gpio"); if (ret) { @@ -98,8 +96,7 @@ err: static int __devexit gpio_poweroff_remove(struct platform_device *pdev) { - if (gpio_num != -1) - gpio_free(gpio_num); + gpio_free(gpio_num); if (pm_power_off == &gpio_poweroff_do_poweroff) pm_power_off = NULL; @@ -115,15 +112,15 @@ static struct platform_driver gpio_poweroff_driver = { .probe = gpio_poweroff_probe, .remove = __devexit_p(gpio_poweroff_remove), .driver = { - .name = "poweroff-gpio", - .owner = THIS_MODULE, - .of_match_table = of_gpio_poweroff_match, - }, + .name = "poweroff-gpio", + .owner = THIS_MODULE, + .of_match_table = of_gpio_poweroff_match, + }, }; module_platform_driver(gpio_poweroff_driver); MODULE_AUTHOR("Jamie Lentin "); MODULE_DESCRIPTION("GPIO poweroff driver"); -MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:poweroff-gpio"); -- cgit v0.10.2 From 107c21c3461d402ac0d2cdc1929e686612890727 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Sun, 6 Jan 2013 11:10:36 +0100 Subject: ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers Clock Management of kirkwood has moved to DT clock providers. However, TWSI1 has not yet been done. This switches TWSI1 of 88f6282 to DT clock providers. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 9ae2004..4ccea21 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi @@ -39,6 +39,7 @@ #size-cells = <0>; interrupts = <32>; clock-frequency = <100000>; + clocks = <&gate_clk 7>; status = "disabled"; }; }; -- cgit v0.10.2 From d2268be3dc0ef59f9d572f082c08e698e4617bc4 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:37 +0100 Subject: ARM: Kirkwood: Fix missing sdio clock We moved to declaring clk gates in DT. However, device which do not yet have a DT binding need to have a clkdev alias. This was missing for SDIO. Signed-off-by: Andrew Lunn Tested-by: Stefan Peter Signed-off-by: Jason Cooper diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index ff4150a..de4fd2b 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -67,6 +67,10 @@ static void __init kirkwood_legacy_clk_init(void) orion_clkdev_add(NULL, "mv643xx_eth_port.1", of_clk_get_from_provider(&clkspec)); + clkspec.args[0] = CGC_BIT_SDIO; + orion_clkdev_add(NULL, "mvsdio", + of_clk_get_from_provider(&clkspec)); + } static void __init kirkwood_of_clk_init(void) -- cgit v0.10.2 From 8758c885c43859266e45db588b1a5992c049c595 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:38 +0100 Subject: ARM: Kirkwood: Use fixed-regulator instead of board gpio call With the change to a DT based pinctrl/gpio driver, using gpio API calls in board-*.c files no longer works, a dereferenced NULL pointer exception occurs instead. By converting the GPIO code into a fixed-regulator which gets probed later once pinctrl/gpio is available, we avoid the exception. Signed-off-by: Andrew Lunn Tested-by: Stefan Peter Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index c0de5a7..cd15452 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts @@ -82,4 +82,21 @@ gpios = <&gpio1 16 1>; }; }; + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + sata0_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "SATA0 Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio1 4 0>; + }; + }; }; diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 15e69fc..23d2dd1 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = { 0 }; -#define TOPKICK_SATA0_PWR_ENABLE 36 - void __init usi_topkick_init(void) { /* @@ -73,8 +71,6 @@ void __init usi_topkick_init(void) */ kirkwood_mpp_conf(topkick_mpp_config); - /* SATA0 power enable */ - gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); kirkwood_ge00_init(&topkick_ge00_data); kirkwood_sdio_init(&topkick_mvsdio_data); -- cgit v0.10.2 From 3810e6304185f5a5bc4bb99b0ed467a28e63e9ed Mon Sep 17 00:00:00 2001 From: Joshua Coombs Date: Sun, 6 Jan 2013 11:10:39 +0100 Subject: clk: mvebu: Remove inappropriate __init tagging If the Orion WDT driver is built as a module, an opps occurs during clk lookup when calling mvebu_clk_gating_get_src(). Remove the inappropriate __init tag so the function is available for modules after kernel init. Signed-off-by: Joshua Coombs Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c index c6d3c26..8fa5408 100644 --- a/drivers/clk/mvebu/clk-gating-ctrl.c +++ b/drivers/clk/mvebu/clk-gating-ctrl.c @@ -32,7 +32,7 @@ struct mvebu_soc_descr { #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) -static struct clk __init *mvebu_clk_gating_get_src( +static struct clk *mvebu_clk_gating_get_src( struct of_phandle_args *clkspec, void *data) { struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data; -- cgit v0.10.2 From 44cfae9ac608fbad98d0e139bc81fe0abd21e3c3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 6 Jan 2013 11:10:40 +0100 Subject: arm: mvebu: Armada XP MV78230 has two cores, not one Contrary to our understanding at the time armada-xp-mv78230.dtsi was written, the MV78230 variant of the Armada XP SoC has two cores and not one. This patch updates the .dtsi file to take into account this reality. Signed-off-by: Thomas Petazzoni Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index c45c7b4..8f90fac 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi @@ -34,6 +34,13 @@ reg = <0>; clocks = <&cpuclk 0>; }; + + cpu@1 { + device_type = "cpu"; + compatible = "marvell,sheeva-v7"; + reg = <1>; + clocks = <&cpuclk 1>; + }; } soc { -- cgit v0.10.2 From 77916519cba3425c7e3a6d17393d123f9b76e54f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 6 Jan 2013 11:10:41 +0100 Subject: arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces We originally thought that the MV78230 variant of the Armada XP had four Ethernet interfaces, like the other variants MV78260 and MV78460. In fact, this is not true, and the MV78230 has only three Ethernet interfaces. So, the definitions of the Ethernet interfaces is now done as follows: * armada-370-xp.dtsi: definitions of the first two interfaces, that are common to Armada 370 and Armada XP * armada-xp.dtsi: definition of the third interface, common to all Armada XP variants. * armada-xp-mv78260.dtsi and armada-xp-mv78460.dtsi: definition of the fourth interface. Signed-off-by: Thomas Petazzoni Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index a2aee57..1c1937d 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi @@ -85,5 +85,13 @@ #interrupts-cells = <2>; interrupts = <24>; }; + + ethernet@d0034000 { + compatible = "marvell,armada-370-neta"; + reg = <0xd0034000 0x2500>; + interrupts = <14>; + clocks = <&gateclk 1>; + status = "disabled"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index da03a12..4905cf3 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi @@ -100,5 +100,13 @@ #interrupts-cells = <2>; interrupts = <24>; }; + + ethernet@d0034000 { + compatible = "marvell,armada-370-neta"; + reg = <0xd0034000 0x2500>; + interrupts = <14>; + clocks = <&gateclk 1>; + status = "disabled"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 8a85ffe..2e37ef1 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -95,14 +95,6 @@ status = "disabled"; }; - ethernet@d0034000 { - compatible = "marvell,armada-370-neta"; - reg = <0xd0034000 0x2500>; - interrupts = <14>; - clocks = <&gateclk 1>; - status = "disabled"; - }; - xor@d0060900 { compatible = "marvell,orion-xor"; reg = <0xd0060900 0x100 -- cgit v0.10.2 From 41be8dc1a44ee2a0a52bdf2b77273624c40782b6 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:42 +0100 Subject: arm: mvebu: Add missing ; for cpu node. The Armada XP MV78230 DT include file is missing a ; at the end of the cpu node. Reported-by: Thomas Petazzoni Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 8f90fac..271855a 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi @@ -41,7 +41,7 @@ reg = <1>; clocks = <&cpuclk 1>; }; - } + }; soc { pinctrl { -- cgit v0.10.2 From ab6e439fd07aba7cadcadb3fb5e11d3758e19679 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 6 Jan 2013 11:10:43 +0100 Subject: dma: mv_xor: fix error handling of mv_xor_channel_add() When mv_xor_channel_add() fails for one XOR channel, we jump to the err_channel_add label to clean up all previous channels that had been initialized correctly. Unfortunately, while handling this error condition, we were disposing the IRQ mapping before calling mv_xor_channel_remove() (which does the free_irq()), which is incorrect. Instead, do things properly in the reverse order of the initialization: first remove the XOR channel (so that free_irq() is done), and then dispose the IRQ mapping. This avoids ugly warnings when for some reason one of the XOR channel fails to initialize. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index ac71f55..cc5d23d 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -1361,9 +1361,9 @@ static int mv_xor_probe(struct platform_device *pdev) err_channel_add: for (i = 0; i < MV_XOR_MAX_CHANNELS; i++) if (xordev->channels[i]) { + mv_xor_channel_remove(xordev->channels[i]); if (pdev->dev.of_node) irq_dispose_mapping(xordev->channels[i]->irq); - mv_xor_channel_remove(xordev->channels[i]); } clk_disable_unprepare(xordev->clk); -- cgit v0.10.2 From dab9206445952e64213582b2ab9077972850d65b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 6 Jan 2013 11:10:44 +0100 Subject: dma: mv_xor: fix error handling for clocks When a channel fails to initialize, we release all ressources, including clocks. However, a XOR unit is not necessarily associated to a clock (some variants of Marvell SoCs have a clock for XOR units, some don't), so we shouldn't unconditionally be releasing the clock. Instead, just like we do in the mv_xor_remove() function, we should check if one clock was found before releasing it. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index cc5d23d..e17fad0 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -1366,8 +1366,11 @@ err_channel_add: irq_dispose_mapping(xordev->channels[i]->irq); } - clk_disable_unprepare(xordev->clk); - clk_put(xordev->clk); + if (!IS_ERR(xordev->clk)) { + clk_disable_unprepare(xordev->clk); + clk_put(xordev->clk); + } + return ret; } -- cgit v0.10.2 From db7d77e6a7a60dbbac34fe59bc38bc8e7e5e1380 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Mon, 26 Nov 2012 20:16:38 +0100 Subject: ARM: Dove: Add pinctrl clock to DT During merge of the mvebu patches a clock gate for pinctrl was lost. This patch just readds the clock gate. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index f3f7e9d..42eac1f 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -117,6 +117,7 @@ pinctrl: pinctrl@d0200 { compatible = "marvell,dove-pinctrl"; reg = <0xd0200 0x10>; + clocks = <&gate_clk 22>; }; spi0: spi@10600 { -- cgit v0.10.2 From ba607b6238a1f418c45b9d7f73212bcc6922da53 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Mon, 26 Nov 2012 20:16:39 +0100 Subject: pinctrl: mvebu: make pdma clock on dove mandatory With the ability to pass clocks through DT, now make the pdma clock of dove pinctrl mandatory. Otherwise, pinctrl will hang the system when accessing some registers. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 40c9c3e..9cc219f 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c @@ -595,8 +595,11 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev) * grab clk to make sure it is ticking. */ clk = devm_clk_get(&pdev->dev, NULL); - if (!IS_ERR(clk)) - clk_prepare_enable(clk); + if (IS_ERR(clk)) { + dev_err(&pdev->dev, "Unable to get pdma clock"); + return PTR_RET(clk); + } + clk_prepare_enable(clk); return mvebu_pinctrl_probe(pdev); } -- cgit v0.10.2