Commit ab7ad9fe authored by Paul Mundt's avatar Paul Mundt

ARM: OMAP: Add a tag for preferring the STI console.

Presently we have OMAP_TAG_SERIAL_CONSOLE that wraps in to
add_preferred_console() for the serial console, this does the same
thing with OMAP_TAG_STI_CONSOLE so it's selectable who gets tty
control.
Signed-off-by: default avatarPaul Mundt <paul.mundt@nokia.com>
parent 9f43ca7f
......@@ -15,12 +15,13 @@
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <asm/arch/sti.h>
#include <asm/arch/board.h>
#define DRV_NAME "sticon"
static struct tty_driver *tty_driver;
static DEFINE_SPINLOCK(sti_console_lock);
static unsigned int sti_console_channel = 32;
static unsigned int sti_console_channel;
static int sti_line_done = -1;
/*
......@@ -132,6 +133,16 @@ static struct console sti_console = {
static int __init sti_console_init(void)
{
const struct omap_sti_console_config *info;
info = omap_get_config(OMAP_TAG_STI_CONSOLE,
struct omap_sti_console_config);
if (info && info->enable) {
add_preferred_console(DRV_NAME, 0, NULL);
sti_console_channel = info->channel;
}
register_console(&sti_console);
return 0;
}
......
......@@ -21,6 +21,7 @@
#define OMAP_TAG_LCD 0x4f05
#define OMAP_TAG_GPIO_SWITCH 0x4f06
#define OMAP_TAG_UART 0x4f07
#define OMAP_TAG_STI_CONSOLE 0x4f09
#define OMAP_TAG_BOOT_REASON 0x4f80
#define OMAP_TAG_FLASH_PART 0x4f81
......@@ -55,6 +56,11 @@ struct omap_serial_console_config {
u32 console_speed;
};
struct omap_sti_console_config {
unsigned enable:1;
u8 channel;
};
struct omap_usb_config {
/* Configure drivers according to the connectors on your board:
* - "A" connector (rectagular)
......
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