This rtc driver is currently only used by the Technologic Systems TS-72xx
(arm/mach-ep93xx) and TS-78xx (arm/mach-orion5x) SBCs. These platforms use
static I/O mappings for the registers needed to access the index and data
registers of the chip.
On the TS-78xx there is one I/O mapping of SZ_1M for the entire FPGA address
space. The rtc index and data registers are located in that space along with
all the other FPGA devices.
On the TS-72xx the mapping is a bit uglier. That platform uses a CPLD to
access the rtc. The CPLD is connected to two chip select lines of the
processor and each chip select addresses 256 MiB. Address lines 25-22 and 0
are then decoded for the various devices. Since mapping the entire 256 MiB
for each address space would be _really_ ugly, a SZ_4K mapping is done for
each register that is needed.
This series does the following:
1) Cleanup this driver to remove all the checkpatch.pl issues.
2) Modify the probe to, optionally, ioremap the resources provided by the
platform and handle the read/write operations internally.
3) Add support for the NVRAM in the rtc.
With these changes the static I/O mappings for the rtc registers can be
removed from the ts-72xx platform.
Currently the ts78xx platform does some "probing" of the rtc NVRAM to see
if it is actually present before registering the rtc device. This "probing"
just checks if the NVRAM is present by reading/writing the last two bytes
of the NVRAM. I'm not sure if this is really necessary. If it can be removed
all the m48t86_ops stuff could also be removed from this driver, along with
platform_data/rtc-m48t86.h.
H Hartley Sweeten (3):
rtc: m48t86: shorten register name defines
rtc: m48t86: allow driver to manage it's resources
rtc: m48t86: add NVRAM support
drivers/rtc/rtc-m48t86.c | 247 ++++++++++++++++++++++++++++++++---------------
1 file changed, 169 insertions(+), 78 deletions(-)
--
2.10.0
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.