summaryrefslogtreecommitdiffstats
path: root/drivers/tty/goldfish.c
diff options
context:
space:
mode:
authorAlan <alan@acox1-desk.ger.corp.intel.com>2014-05-12 16:57:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-15 13:20:42 -0700
commite0f682e05f51c9eff68e61ce2350155895cd739e (patch)
tree5a22daa4832243fb35dbdab60aa78ccf4f21476f /drivers/tty/goldfish.c
parentf6279717bbb20bf90ec414af17d2a31d843f5eb5 (diff)
downloadblackbird-op-linux-e0f682e05f51c9eff68e61ce2350155895cd739e.tar.gz
blackbird-op-linux-e0f682e05f51c9eff68e61ce2350155895cd739e.zip
goldfish: clean up tty 64bit support
Use the helper we now have available. 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.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c
index 08167aa093b2..7eaafe3c80dc 100644
--- a/drivers/tty/goldfish.c
+++ b/drivers/tty/goldfish.c
@@ -21,6 +21,7 @@
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/goldfish.h>
enum {
GOLDFISH_TTY_PUT_CHAR = 0x00,
@@ -29,9 +30,7 @@ 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,
@@ -60,10 +59,8 @@ static void goldfish_tty_do_write(int line, const char *buf, unsigned count)
struct goldfish_tty *qtty = &goldfish_ttys[line];
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
+ gf_write64((u64)buf, base + GOLDFISH_TTY_DATA_PTR,
+ base + GOLDFISH_TTY_DATA_PTR_HIGH);
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_WRITE_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);
@@ -84,10 +81,8 @@ 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
+ gf_write64((u64)buf, base + GOLDFISH_TTY_DATA_PTR,
+ base + GOLDFISH_TTY_DATA_PTR_HIGH);
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);
OpenPOWER on IntegriCloud