Commit 258e0551 authored by Shawn Guo's avatar Shawn Guo

serial: amba-pl011: adopt pinctrl support

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent dffa27e7
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pinctrl/consumer.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/sizes.h> #include <asm/sizes.h>
...@@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct uart_amba_port *uap; struct uart_amba_port *uap;
struct vendor_data *vendor = id->data; struct vendor_data *vendor = id->data;
struct pinctrl *pinctrl;
void __iomem *base; void __iomem *base;
int i, ret; int i, ret;
...@@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
goto free; goto free;
} }
pinctrl = devm_pinctrl_get_select_default(&dev->dev);
if (IS_ERR(pinctrl)) {
ret = PTR_ERR(pinctrl);
goto unmap;
}
uap->clk = clk_get(&dev->dev, NULL); uap->clk = clk_get(&dev->dev, NULL);
if (IS_ERR(uap->clk)) { if (IS_ERR(uap->clk)) {
ret = PTR_ERR(uap->clk); ret = PTR_ERR(uap->clk);
......
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