Commit graph

25515 commits

Author SHA1 Message Date
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
David S. Miller
454eeb2dd7 sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.
Use of_ioremap() and of_iounmap() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:13 -07:00
David S. Miller
98261dd1a3 sparc: Remove dinky old-style SBUS probing facilities.
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>
2008-08-29 02:15:12 -07:00
David S. Miller
104364810f sparc: Remove SBUS layer resource and irq handling.
All the drivers use OF device objects now for this
information.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:11 -07:00
David S. Miller
33c4655c00 sparc: Kill SBUS layer IRQ hooks.
IRQs are obtained by drivers from the of_device struct.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:10 -07:00
David S. Miller
71d3721189 sparc32: Convert sun4d IRQ code to use generic device tree probing.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:09 -07:00
David S. Miller
f1b6aa87b7 sparc32: Convert pmc to OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:09 -07:00
David S. Miller
7e7e2f0356 sparc32: Convert apc to OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:08 -07:00
David S. Miller
4b1c5df2af sparc32: Make mmu_map_dma_area and mmu_unmap_dma_area take a device pointer.
This lets us kill this "map it in every IOMMU" crazy code, and also
some of the final references to sbus_root.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:07 -07:00
David S. Miller
b1387c35be sparc32: Kill mmu_translate_dvma and implementations.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:03 -07:00
David S. Miller
aba945e76b sparc32: Kill mmu_translate_dvma() usage.
Just simply use virt_to_page() on the provided virtual address pointer.

Kill #if 0'd code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:02 -07:00
David S. Miller
10a104f9c5 sparc64: Convert SBUS floppy probing to use OF device objects.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:01 -07:00
David S. Miller
63237eeb5a sparc: Move SBUS DMA attribute interfaces out of asm/sbus.h
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>
2008-08-29 02:13:31 -07:00
David S. Miller
738f2b7b81 sparc: Convert all SBUS drivers to dma_*() interfaces.
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>
2008-08-29 02:13:15 -07:00
David S. Miller
944c67dff7 sparc32: Implement more generic dma_*() interfaces.
These dispatch to either PCI or SBUS routines based upon
the device bus type.

This will allow us to let SBUS drivers call these routines.

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