summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-02-04 19:09:15 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-02-04 19:09:15 +0100
commit2afe398a62d8e89c97b559d154699e7dc494437a (patch)
treeea2a17f8a41ca0c99db5d6fffff7ba30cd545042 /drivers/serial
parent1b95290433eca0f8190da377547df0743099ec84 (diff)
parente1f025671d2225c7215b5b3df74c89b6e3531ac8 (diff)
downloadbarebox-2afe398a62d8e89c97b559d154699e7dc494437a.tar.gz
barebox-2afe398a62d8e89c97b559d154699e7dc494437a.tar.xz
Merge branch 'for-next/raspberry-pi'
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/amba-pl011.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index fc7723ea8a..4c4067d5b5 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -28,6 +28,7 @@
#include <init.h>
#include <malloc.h>
#include <io.h>
+#include <regulator.h>
#include <linux/amba/serial.h>
#include <linux/clk.h>
#include <linux/err.h>
@@ -181,6 +182,16 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
{
struct amba_uart_port *uart;
struct console_device *cdev;
+ struct regulator *r;
+
+ r = regulator_get(&dev->dev, NULL);
+ if (r) {
+ int ret;
+
+ ret = regulator_enable(r);
+ if (ret)
+ return ret;
+ }
uart = xzalloc(sizeof(struct amba_uart_port));
uart->clk = clk_get(&dev->dev, NULL);