goldfish/tty.c: Add device version register

qemu2 (ranchu) has introduced changes to the way this
device handles IO operations, it uses physical instead
of virtual addresses. Changes have been made to the
driver as well on android-goldfish-3.10 branch.

The driver now assumes that this device implements
versioning register on offset 0x20 :

TTY_VERSION        = 0x20

It uses this information to detect which platform it's
running on (Goldfish or Ranchu) and pass on virtual
or physical addresses accordingly.

And a little bit of estetic cleanup.

Change-Id: I219c895a49f9a3dbac3b9c0cd003152e5ba5a36d
1 file changed