Fix setting of a year in m48t08 and m48t02 clocks.
They do not have century bits and setting them
causes the year to overflow (bit 0x80 set).
Problem found by Robert Reif on Sun Sparcstation 20.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add support for externally mapped ioaddr. This is required on sparc32
as the ioaddr must be mapped with of_ioremap().
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add support for two compatible RTC:
- M48T08 which does not have alarm part,
- M48T08 which does not have alarm part and has
only 2KB of NVRAM
These types covers all Mostek's RTC used in Sun UltraSparc workstations.
Tested on Sun Ultra60 with M48T59 RTC.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Remove element size from the structure m48t59_private as it is used as
local variable for storing temporary value.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This mirrors the of_device_id[] changes done in
fd098316ef ("sparc: Annotate
of_device_id arrays with const or __initdata.")
Signed-off-by: David S. Miller <davem@davemloft.net>
While doing some easy cleanups on the sparc code I noticed that the
CONFIG_SUN4 code seems to be worse than the rest - there were some
"I don't know how it should work, but the current code definitely cannot
work." places.
And while I have seen people running Linux on machines like a
SPARCstation 5 a few years ago I don't recall having seen sun4
machines, even less ones running Linux.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This thing was a mess, who wrote this junk? :)
Luckily we'll soon have nice generic I2C layer drivers for this PCF
based I2C stuff on sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
This also cleans up a lot of crud in this driver:
1) Don't touch the BBC regs, just leave the watchdog trigger
behavior whatever the firmware programmed it to.
2) Use WATCHDOG_MINOR instead of hardcoded and not properly
allocated RIOWD_MINOR.
Hey, I haven't touched it since I wrote it years ago :-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Add Sparc to the Kconfig depends list.
Add __sparc___ to address_sparc = 128 ifdef.
Finally, don't be concerned about 24-hour BCD mode support if the RTC
doesn't have a valid IRQ. We won't even use the alarm code in this
case and the Sparc RTCs have this limitation.
Signed-off-by: David S. Miller <davem@davemloft.net>
The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.
Signed-off-by: David S. Miller <davem@davemloft.net>
32-bit sparc just needed it to register the ioport procfs bits, do this
via an arch_initcall() instead.
Signed-off-by: David S. Miller <davem@davemloft.net>
No drivers or code uses this stuff any more, every driver has been
converted over to OF device probing.
Signed-off-by: David S. Miller <davem@davemloft.net>
This is in preparation for the subsequent asm/sbus.h removal.
Also, make these routines take a "struct device" or no
arguments, as appropriate.
Signed-off-by: David S. Miller <davem@davemloft.net>
And all the SBUS dma interfaces are deleted.
A private implementation remains inside of the 32-bit sparc port which
exists only for the sake of the implementation of dma_*().
Signed-off-by: David S. Miller <davem@davemloft.net>
This thing was completely pointless.
Just find the OF device in the parent of drivers that want to program
this device, and map the DMA regs inside such drivers too.
This also moves the dummy claim_dma_lock() and release_dma_lock()
implementation to floppy_32.h, which makes it handle this issue
just like floppy_64.h does.
Signed-off-by: David S. Miller <davem@davemloft.net>
This has been marked BROKEN for a long time and it's more likely
to get rewritten from scratch than to be fixed up and made usable.
Signed-off-by: David S. Miller <davem@davemloft.net>