Add Goldfish RTC DT enabled device driver
Goldfish real-time clock (RTC) device
Taken from
<AOSP>/external/qemu/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
Relevant files:
$QEMU/hw/timer/goldfish_timer.c
$KERNEL/drivers/rtc/rtc-goldfish.c
Device properties:
Name: goldfish_rtc
Id: -1
IrqCount: 1
I/O Registers:
0x00 R TIME_LOW - Get current time low-order 32-bits.
0x04 R TIME_HIGH - Return current time high 32-bits.
0x08 W ALARM_LOW - Set low 32-bit value or alarm and arm it.
0x0c W ALARM_HIGH - Set high 32-bit value of alarm.
0x10 W CLEAR_INTERRUPT - Lower device's irq level.
This device is _very_ similar to the Goldfish timer one,
with the following important differences:
- Values reported are still 64-bit nanoseconds, but
they have a granularity of 1 second, and represent
host-specific values (really 'time() * 1e9')
- The alarm is non-functioning, i.e. writing to
ALARM_LOW / ALARM_HIGH will work, but will never
arm any alarm.
Device tree initialisation example:
goldfish_rtc@
1f006000 {
interrupts = <0xe>;
reg = <0x1f006000 0x1000>;
compatible = "generic,goldfish-rtc";
};
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Change-Id: I724c35508ba65dae526c3b05229629cb9f81559f