]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: at91sam9: make use of syscon/regmap to access GPBR registers
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 23 Sep 2014 11:14:44 +0000 (13:14 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 13 Nov 2014 15:08:00 +0000 (16:08 +0100)
commit8d1c05cade2ca83e73d3d3a7efb5742a26772fd8
treebe9be4cd27b0354914d07fc060b56f41c2a23041
parent6d75f9d07fe696b0bac0a02479da566bad357ed5
rtc: at91sam9: make use of syscon/regmap to access GPBR registers

The GPBR registers are not part of the RTT block and thus should not be
defined in the reg property of the rtt node.

Use syscon to provide a proper DT representation and reference the GPBR
syscon device in a new "atmel,rtt-rtc-time-reg" property which store both
the syscon device phandle and the register offset within the GPBR block.

When using non DT boards, we won't be able to retrieve the syscon regmap,
hence we need to create our own regmap using the memory region defined
in the 2nd memory resource assigned to the RTT platform device.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
drivers/rtc/Kconfig
drivers/rtc/rtc-at91sam9.c