summaryrefslogtreecommitdiff
path: root/drivers/tty/goldfish.c
diff options
context:
space:
mode:
authorJun Tian <jun.j.tian@intel.com>2014-05-12 19:55:26 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-16 00:19:01 +0400
commitb8658bc81089d656fe54b12e21f0cae5116b6483 (patch)
tree4495fba97e29bd3e9c4ecc50ea9c71dbcc989e5d /drivers/tty/goldfish.c
parentec5e34c074793a1f80faaf75e9468dd2f39ec1dc (diff)
downloadlinux-b8658bc81089d656fe54b12e21f0cae5116b6483.tar.xz
goldfish: enable 64-bit tty driver
Signed-off-by: Jun Tian <jun.j.tian@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/goldfish.c')
-rw-r--r--drivers/tty/goldfish.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c
index 75dc9d25f326..08167aa093b2 100644
--- a/drivers/tty/goldfish.c
+++ b/drivers/tty/goldfish.c
@@ -29,6 +29,9 @@ enum {
GOLDFISH_TTY_DATA_PTR = 0x10,
GOLDFISH_TTY_DATA_LEN = 0x14,
+#ifdef CONFIG_64BIT
+ GOLDFISH_TTY_DATA_PTR_HIGH = 0x18,
+#endif
GOLDFISH_TTY_CMD_INT_DISABLE = 0,
GOLDFISH_TTY_CMD_INT_ENABLE = 1,
@@ -58,6 +61,9 @@ static void goldfish_tty_do_write(int line, const char *buf, unsigned count)
void __iomem *base = qtty->base;
spin_lock_irqsave(&qtty->lock, irq_flags);
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
+#ifdef CONFIG_64BIT
+ writel((u32)((u64)buf >> 32), base + GOLDFISH_TTY_DATA_PTR_HIGH);
+#endif
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_WRITE_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);
@@ -79,6 +85,9 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)
count = tty_prepare_flip_string(&qtty->port, &buf, count);
spin_lock_irqsave(&qtty->lock, irq_flags);
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
+#ifdef CONFIG_64BIT
+ writel((u32)((u64)buf >> 32), base + GOLDFISH_TTY_DATA_PTR_HIGH);
+#endif
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);