summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-10-19 09:18:03 +0530
committerRabin VINCENT <rabin.vincent@stericsson.com>2011-10-19 08:52:42 +0200
commitc7ce5a77202fc3237d6002b151b49dd21a809901 (patch)
treee5b403445327dd84103302c1836f914216e38fa5
parentfcf7cfbae7b3dcca70e9a72ffa741c1cf7f84f8c (diff)
serial/amba-pl011: prevent console port from holding regulator
Register the console in a console_initcall() to ensure that pl011_console_setup() gets called early and thus the uart_console() macro usage in pl011_power_startup() returns the correct value the first time it is called, so that the vAPE regulator is not taken for the console port. Note that this problem is seen only when the console port is line 0, since even without this patch pl011_console_setup() gets called (and thus the correct console->index is set) after the first port is added. ST-Ericsson ID: 368522 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I7f4ab80e8d8be014bfdbe695ea45007212c9c4ea Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34411 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Reviewed-by: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
-rw-r--r--drivers/tty/serial/amba-pl011.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7035910de79..e0cfb4acc0b 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2152,6 +2152,13 @@ static struct console amba_console = {
.data = &amba_reg,
};
+static int __init pl011_console_init(void)
+{
+ register_console(&amba_console);
+ return 0;
+}
+console_initcall(pl011_console_init);
+
#define AMBA_CONSOLE (&amba_console)
#else
#define AMBA_CONSOLE NULL