Commit Graph

25529 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
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
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
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
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
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
84d6bd5ef7 sparc64: Use generic sun4v RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:51 -07:00
David S. Miller
29b503f11c sparc64: Use generic BQ4802 RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:50 -07:00
David S. Miller
da86783dda sparc64: Use generic CMOS driver.
Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:48 -07:00
David S. Miller
e8b75c4fd6 sparc: asm/mostek.h is now 32-bit only
No need for the 64-bit header version any more.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:47 -07:00
David S. Miller
1518e7ed08 sparc64: Convert Mostek rtc to use generic RTC layer driver.
Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:47 -07:00
David S. Miller
a0b31b578f sparc64: Check for RTC class device in update_persistent_clock().
As we convert the various by-hand sparc64 RTC drivers to use the
generic RTC framework and drivers, we need to keep the NTP
set_rtc_mmss() support via update_persistent_clock() working.

In the end, after all the RTC device cases are converted, this
local set_rtc_mmss() function will be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:46 -07:00
David S. Miller
90de9dea3b sparc64: Select RTC_CLASS
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:45 -07:00
David S. Miller
7eb1aae555 sparc: Delete asm/sbus*.h
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:24 -07:00
David S. Miller
9dc69230a9 sparc: Kill now spurious includes of sbus.h
In order to make this week I also had to add an include
of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c
really depends upon getting this header somehow.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:23 -07:00
David S. Miller
0ad626a2a4 sparc32: Kill iounit_map_dma_*().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:23 -07:00
David S. Miller
47a2d72885 sparc: Kill sbus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:22 -07:00
David S. Miller
046e26a8ba sparc: Remove generic SBUS probing layer.
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>
2008-08-29 02:15:21 -07:00
David S. Miller
5059625ed8 sparc: Add OF archdata propagation helper.
Add a helper function that, given a bus of_device node, propagates
all iommu, stc, and host_controller values down to the child nodes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:20 -07:00
David S. Miller
f8e4d32cb5 sparc: Kill sbus_arch_preinit().
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>
2008-08-29 02:15:19 -07:00
David S. Miller
d32bcdd7a9 sparc32: Kill sbus_is_slave().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:19 -07:00
David S. Miller
c6e5f661ee sparc: Kill OBP property members of sbus_dev and sbus_bus
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:18 -07:00
David S. Miller
9b9644c6d9 sparc: Kill sbus_devaddr() and sbus_dev_slot().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:14 -07:00
David S. Miller
615deeb27b sparc: Kill sbus_ioremap() and sbus_iounmap().
No more users.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:13 -07:00