linux/drivers
Maciej W. Rozycki 31632dbdba drivers/rtc/rtc-cmos.c: drivers/char/rtc.c features for DECstation support
This brings in drivers/char/rtc.c functionality required for DECstation
and, should the maintainers decide to switch, Alpha systems to use
rtc-cmos.

Specifically these features are made available:

* RTC iomem rather than x86/PCI port I/O mapping, controlled with the
  RTC_IOMAPPED macro as with the original driver.  The DS1287A chip in all
  DECstation systems is mapped in the host bus address space as a
  contiguous block of 64 32-bit words of which the least significant byte
  accesses the RTC chip for both reads and writes.  All the address and
  data window register accesses are made transparently by the chipset glue
  logic so that the device appears directly mapped on the host bus.

* A way to set the size of the address space explicitly with the
  newly-added `address_space' member of the platform part of the RTC
  device structure.  This avoids the unreliable heuristics that does not
  work in a setup where the RTC is not explicitly accessed with the usual
  address and data window register pair.

* The ability to use the RTC periodic interrupt as a system clock
  device, which is implemented by arch/mips/kernel/cevt-ds1287.c for
  DECstation systems and takes the RTC interrupt away from the RTC driver.
   Eventually hooking back to the clock device's interrupt handler should
  be possible for the purpose of the alarm clock and possibly also
  update-in-progress interrupt, but this is not done by this change.

  o To avoid interfering with the clock interrupt all the places where
    the RTC interrupt mask is fiddled with are only executed if and IRQ
    has been assigned to the RTC driver.

  o To avoid changing the clock setup Register A is not fiddled with
    if CMOS_RTC_FLAGS_NOFREQ is set in the newly-added `flags' member of
    the platform part of the RTC device structure.  Originally, in
    drivers/char/rtc.c, this was keyed with the absence of the RTC
    interrupt, just like the interrupt mask, but there only the periodic
    interrupt frequency is set, whereas rtc-cmos also sets the divider
    bits.  Therefore a new flag is introduced so that systems where the
    RTC interrupt is not usable rather than used as a system clock device
    can fully initialise the RTC.

* A small clean-up is made to the IRQ assignment code that makes the IRQ
  number hardcoded to -1 rather than arbitrary -ENXIO (or whatever error
  happens to be returned by platform_get_irq) where no IRQ has been
  assigned to the RTC driver (NO_IRQ might be another candidate, but it
  looks like this macro has inconsistent or missing definitions and
  limited use and might therefore be unsafe).

Verified to work correctly with a DECstation 5000/240 system.

[akpm@linux-foundation.org: fix weird code layout]
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-06 16:08:07 -07:00
..
accessibility
acpi ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
amba
ata
atm
auxdisplay
base cma: increase CMA_ALIGNMENT upper limit to 12 2014-06-04 16:54:08 -07:00
bcma
block Merge branch 'akpm' (patchbomb from Andrew) into next 2014-06-04 16:55:13 -07:00
bluetooth TTY/Serial driver patches for 3.16-rc1 2014-06-03 09:01:02 -07:00
bus ARM: SoC driver changes 2014-06-02 16:35:49 -07:00
cdrom
char ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
clk DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:57:20 -07:00
connector Char / misc driver patches for 3.16-rc1 2014-06-03 08:06:56 -07:00
cpufreq ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
cpuidle ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
crypto crypto/nx/nx-842: dev_set_drvdata can no longer fail 2014-05-28 13:39:51 -07:00
dca
devfreq
dio
dma ARM: SoC driver changes 2014-06-02 16:35:49 -07:00
edac PCI changes for the v3.16 merge window: 2014-06-02 12:15:19 -07:00
eisa
extcon
firewire sound updates for 3.16-rc1 2014-06-04 09:08:25 -07:00
firmware Merge branch 'arm64-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-05 13:15:32 -07:00
fmc
gpio This is the bulk of GPIO changes for the v3.16 series: 2014-06-02 08:46:03 -07:00
gpu drm/exynos: call find_vma with the mmap_sem held 2014-06-04 16:54:00 -07:00
hid Merge branches 'for-3.16/i2c-hid', 'for-3.16/rmi4', 'for-3.16/sony' and 'for-3.16/thingm' into for-linus 2014-06-04 13:09:43 +02:00
hsi
hv hv: use correct order when freeing monitor_pages 2014-05-28 13:45:15 -07:00
hwmon New driver for NCT6683D 2014-06-03 11:09:43 -07:00
hwspinlock
i2c
ide
idle
iio Staging driver patches for 3.16-rc1 2014-06-03 08:34:00 -07:00
infiniband
input ARM: SoC updates for 3.16 (part 1) 2014-06-02 16:15:12 -07:00
iommu Merge branch 'akpm' (patchbomb from Andrew) into next 2014-06-04 16:55:13 -07:00
ipack
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
isdn
leds Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid into next 2014-06-04 08:52:36 -07:00
lguest
macintosh
mailbox
mcb
md Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into next 2014-06-04 14:24:30 -07:00
memory
memstick
message
mfd sound updates for 3.16-rc1 2014-06-04 09:08:25 -07:00
misc Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 15:48:23 -07:00
mmc Updates for mmci driver: 2014-06-02 09:22:24 -07:00
mtd Merge branch 'for-3.16/core' of git://git.kernel.dk/linux-block into next 2014-06-02 09:29:34 -07:00
net Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
nfc
ntb
nubus kernel/printk: use symbolic defines for console loglevels 2014-06-04 16:54:17 -07:00
of Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
oprofile
parisc
parport parport: Add support for the WCH353 1S/1P multi-IO card 2014-05-28 12:30:48 -07:00
pci Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
pcmcia
phy
pinctrl This is the bulk of pin control changes for the v3.16 2014-06-03 11:20:32 -07:00
platform ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
pnp Merge branches 'pnp', 'powercap', 'pm-runtime' and 'pm-opp' 2014-06-03 23:13:00 +02:00
power ACPI and power management updates for 3.16-rc1 2014-06-04 08:57:16 -07:00
powercap
pps
ps3
ptp
pwm
rapidio
regulator regulator: Updates for v3.16 2014-06-03 11:44:48 -07:00
remoteproc
reset ARM: SoC driver changes 2014-06-02 16:35:49 -07:00
rpmsg
rtc drivers/rtc/rtc-cmos.c: drivers/char/rtc.c features for DECstation support 2014-06-06 16:08:07 -07:00
s390 At over 200 commits, covering almost all supported architectures, this 2014-06-04 08:47:12 -07:00
sbus
scsi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial into next 2014-06-04 08:50:34 -07:00
sfi
sh Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
sn
soc
spi Merge remote-tracking branch 'spi/topic/workqueue' into spi-next 2014-06-02 17:08:43 +01:00
spmi
ssb
staging Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into next 2014-06-04 14:24:30 -07:00
target Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
tc
thermal
tty Merge branch 'akpm' (patchbomb from Andrew) into next 2014-06-04 16:55:13 -07:00
uio
usb Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
uwb
vfio
vhost
video fbdev changes for 3.16 (omap) 2014-06-04 09:07:08 -07:00
virt
virtio
vlynq
vme
w1 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
watchdog
xen Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-04 15:59:13 -07:00
zorro
Kconfig
Makefile Char / misc driver patches for 3.16-rc1 2014-06-03 08:06:56 -07:00