Commit Graph

109207 Commits

Author SHA1 Message Date
David S. Miller
c4cbe6f96e sparc32: use RTC subsystem
Use rtc subsystem for sparc32 architecture.
Actually, only one driver is needed: m48t59
as it supports the most common clocks on sparc32
machines: m48t08 and m48t02.

[ Add proper RTC layer calls to set_rtc_mmss() -DaveM ]

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 15:52:38 -07:00
Krzysztof Helt
64151ad5b3 rtc-m48t59: allow externally mapped ioaddr
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>
2008-09-03 15:41:57 -07:00
Krzysztof Helt
94fe7424a4 rtc-m48t59: add support for M48T02 and M48T59 chips
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>
2008-09-03 15:39:11 -07:00
Krzysztof Helt
3ca60f6e63 rtc-m48t59: reduce structure m48t59_private
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>
2008-09-03 15:39:11 -07:00
David S. Miller
5280267c1d sparc: Fix handling of LANCE and ESP parent nodes in of_device.c
The device nodes that sit above 'esp' and 'le' on SBUS lack a 'ranges'
property, but we should pass the translation up to the parent node so
that the SBUS level ranges get applied.

Based upon a bug report from Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:05:19 -07:00
David S. Miller
9723f38eb5 sparc32: Fix sun4c build warnings.
Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 03:15:44 -07:00
David S. Miller
8aef727861 pci_sun4v: Use of_get_property().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:56 -07:00
David S. Miller
463801b3ae pci_schizo: Use of_get_property() and delete spurious local vars.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:55 -07:00
David S. Miller
0f73d1bbe6 pci_psycho: Use of_getintprop_default().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:54 -07:00
David S. Miller
446139a8f7 sparc64: Implement SSTATE purely using notifiers and initcalls.
Don't clutter up the tree with sstate_blah() scattered all over the
place.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:49:38 -07:00
David S. Miller
cdb3592a20 sparc64: Move reboot handling into seperate file and kill power reg programming.
We should always use prom_power_off().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:31:11 -07:00
David S. Miller
e822358ac2 sparc64: Pass proper parent device down into root pci_create_bus() call.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 18:32:22 -07:00
David S. Miller
7cc288add4 sparc64: Kill the scan_bus function pointer in struct pci_pbm_info.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 18:32:13 -07:00
David S. Miller
fefbbc73ca sparc64: Use ENTRY/ENDPROC in PCI SUN4V asm.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 03:18:49 -07:00
David S. Miller
687124dda0 sparc64: Use ENTRY/ENDPROC in hypervisor asm.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 03:13:17 -07:00
David S. Miller
3d452e55ef sparc64: Apply const or __initdata to vio_device_id[]
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>
2008-09-01 01:48:52 -07:00
David S. Miller
ba4962d7a6 sparc64: Clean up CPU chip type probing code.
Three main things:

1) Make prober an arch initcall instead of using hard-coded invocation
   from paging_init()

2) Shrink table size, the fpu ident stuff was never used.

3) Use named struct initialized in table.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 21:48:12 -07:00
Adrian Bunk
5110bd21b8 sparc: remove CONFIG_SUN4
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>
2008-08-31 20:59:37 -07:00
David S. Miller
b69416b51b sparc64: Rewrite central driver.
This driver is now limited to just doing the basic clock board and FHC
chip initialization and registering the platform devices for the
per-board LEDs, which are driven by the new LEDS_STARFIRE driver.

The IRQ register handling is already confined purely to the device
tree code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:56:15 -07:00
David S. Miller
5843492ccc leds: Add driver for Sunfire UltraSPARC server LEDs.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:26:48 -07:00
David S. Miller
10d29ff907 sparc64: Delete starfire_cpu_setup().
It does nothing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:40:12 -07:00
David S. Miller
d7472c389e sparc64: Simplify error handling in PCI controller probing.
Based upon suggestions from Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:33:52 -07:00
David S. Miller
fd098316ef sparc: Annotate of_device_id arrays with const or __initdata.
As suggested by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:23:17 -07:00
David S. Miller
933b2a1d8d sparc: Stop setting NO_DMA.
This fixes the build with PCI disabled, we do want the
generic DMA facilities and interfaces even when just SBUS
is enabled.

Based upon a build failure report by Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 12:34:20 -07:00
David S. Miller
c8049966b7 sparc64: Convert FIRE PCI controller driver into a real driver.
And now all the by-hand PCI controller probing junk in pci.c can die too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:14:14 -07:00
David S. Miller
edbe805b2b sparc64: Convert SABRE PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:14:01 -07:00
David S. Miller
b20bfe41ba sparc64: Convert PSYCHO PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:13:20 -07:00
David S. Miller
3822b50964 sparc64: Convert SUN4V PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:50:29 -07:00
David S. Miller
6d19c88f53 sparc64: Convert SCHIZO PCI controller driver into a real driver.
The idea is to convert all of the PCI controller drivers into
genuine OF drivers, then we can get rid of this terrible probing
table and infrastructure in arch/sparc64/kernel/pci.c

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:30:24 -07:00
David S. Miller
c510b9bfa1 sparc64: Don't invoke power_init() from pcibios_init().
That's just silly, use device_initcall() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 01:18:56 -07:00
David S. Miller
e0ac612e69 sparc: Kill ebus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:37:36 -07:00
David S. Miller
356d164757 sparc: Kill EBUS driver layer.
All that remains is the EBUS DMA programming library for
sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:36:11 -07:00
David S. Miller
75081322c9 sparc32: Convert PC RTC probing to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:23:51 -07:00
David S. Miller
afc88ad6b3 cs4231: Convert to EBUS side to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:13:55 -07:00
David S. Miller
3ae627a19e sparc64: Convert EBUS floppy support to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 23:26:23 -07:00
David S. Miller
aae7fb87ec sparc: Move EBUS DMA interfaces into seperate header file.
These have no dependencies on the EBUS probing layer, the clients
setup the registers and all of those details.  The EBUS DMA layer
just programs and manages the DMA controller found in EBUS.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 23:10:21 -07:00
David S. Miller
39890072b3 bbc_envctrl: Fix build errors from bbc_i2c OF conversion.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 22:55:14 -07:00
David S. Miller
ae05f87ee2 sparc64: Propagate PCI device archdata into OF device tree for EBUS.
In order to convert EBUS drivers doing DMA into pure OF drivers,
we need the of_device->dev.archdata setup properly.

EBUS instances that can provide DMA for device nodes sit on PCI,
so detect and propagate the information there.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 22:42:34 -07:00
David S. Miller
e21e245bcd bbc_i2c: Convert to pure OF driver.
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>
2008-08-29 22:34:14 -07:00
David S. Miller
6b8c90f24e envctrl: Convert to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 21:05:15 -07:00
David S. Miller
95d4390579 display7seg: Convert to pure OF device driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 18:01:58 -07:00
David S. Miller
0e52fe8c01 sun_uflash: Convert to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 17:41:36 -07:00
David S. Miller
8ab0dc333e cpwatchdog: Move to drivers/watchdog/cpwd.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 17:07:01 -07:00
David S. Miller
c5f8556cb5 cpwatchdog: Cleanup and convert to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 17:05:51 -07:00
David S. Miller
e25ecd08c4 riowd: Distinguish between driver name and OF device node name.
Driver messages should print the driver name, rather than the
OF device node name.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 15:42:31 -07:00
David S. Miller
957183f32e riowatchdog: Move under drivers/watchdog
The config stuff was already in drivers/watchdog/Kconfig

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 15:40:24 -07:00
David S. Miller
e42311d751 riowatchdog: Convert to pure OF driver.
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>
2008-08-29 15:35:59 -07:00
David S. Miller
f2be6de88d sparc64: Use generic starfire RTC driver.
Also, delete the mini RTC driver, no longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:52 -07:00
David S. Miller
de2cf332b7 rtc: Add Starfire platform RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:52 -07:00
David S. Miller
84d6bd5ef7 sparc64: Use generic sun4v RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:51 -07:00