summaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers
Commit message (Collapse)AuthorAgeFilesLines
* PCI: sh: use generic INTx swizzle from PCI coreBjorn Helgaas2009-01-071-16/+1
| | | | | | | | | | | Use the generic pci_common_swizzle() instead of arch-specific code. Note that pci_common_swizzle() loops based on dev->bus->self, not dev->bus->parent as the sh simple_swizzle() did. I think they are equivalent for this purpose. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* PCI: sh: use generic pci_swizzle_interrupt_pin()Bjorn Helgaas2009-01-072-13/+3
| | | | | | | | Use the generic pci_swizzle_interrupt_pin() instead of arch-specific code. Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* sh: dma: Kill off ISA DMA wrapper.Paul Mundt2008-12-222-107/+0
| | | | | | | There are no more users for this code, and it has been deprecated for some time, so just kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: mach-sh03: Use __set_io_port_base(), kill off special ioport_map().Paul Mundt2008-12-221-1/+2
| | | | | | | | This also fixes up a long-standing bug for this platform where the PIO base was set to a register offset, rather than the actual PIO offset itself. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: pci-sh7780: fix pci memory address maskYoshihiro Shimoda2008-12-221-7/+5
| | | | | | | | Fix the problem that cannot work a PCI device when system memory size is 256Mbyte in 29bit address mode. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add SH DMAC burst mode constantSteve Glendinning2008-12-221-0/+1
| | | | | | | | The SH7709 datasheet defines bit 5 as set for burst mode, clear for cycle-steal mode. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix DMAOR register access on SH7709Steve Glendinning2008-12-221-1/+2
| | | | | | | | | | sh7709 hardware manual says DMAOR is 16 bits long on this platform. Tested and working with a modified smsc911x ethernet driver (sh-dma support patch for this driver is coming soon). Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Migrate common board headers to mach-common/.Paul Mundt2008-10-205-5/+5
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move out the solution engine headers to arch/sh/include/mach-se/Paul Mundt2008-07-291-1/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dma-sh: Fix up dreamcast dma.h mach path.Paul Mundt2008-07-291-1/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: migrate to arch/sh/include/Paul Mundt2008-07-298-10/+10
| | | | | | | | | | | | | This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac. Most of the moving about was done with Sam's directions at: http://marc.info/?l=linux-sh&m=121724823706062&w=2 with subsequent hacking and fixups entirely my fault. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Renesas R0P7785LC0011RL board supportYoshihiro Shimoda2008-07-283-0/+113
| | | | | | | | This adds initial support for the Renesas R0P7785LC0011RL board. This patch supports 29bit address mode only. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: make pcibios_max_latency staticAdrian Bunk2008-07-281-1/+1
| | | | | | | This patch makes the needlessly global pcibios_max_latency static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: make EARLY_PCI_OP's staticAdrian Bunk2008-07-281-1/+1
| | | | | | | This patch makes the needlessly global EARLY_PCI_OP's static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh dreamcast: export board_pci_channelsAdrian Bunk2008-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | This patch fixes the following build error: <-- snip --> ... MODPOST 1837 modules ERROR: "board_pci_channels" [drivers/pcmcia/yenta_socket.ko] undefined! ... make[2]: *** [__modpost] Error 1 <-- snip --> I freely admit that it's a pathological configuration, but as long as it is allowed it should build. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sysdev: Pass the attribute to the low level sysdev show/store functionAndi Kleen2008-07-211-4/+11
| | | | | | | | | | | | | | | | | | | | | | This allow to dynamically generate attributes and share show/store functions between attributes. Right now most attributes are generated by special macros and lots of duplicated code. With the attribute passed it's instead possible to attach some data to the attribute and then use that in shared low level functions to do different things. I need this for the dynamically generated bank attributes in the x86 machine check code, but it'll allow some further cleanups. I converted all users in tree to the new show/store prototype. It's a single huge patch to avoid unbisectable sections. Runtime tested: x86-32, x86-64 Compiled only: ia64, powerpc Not compile tested/only grep converted: sh, arm, avr32 Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: remove unused arch pcibios_update_resource() functionsAdrian Bunk2008-06-271-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Russell King did the following back in 2003: <-- snip --> [PCI] pci-9: Kill per-architecture pcibios_update_resource() Kill pcibios_update_resource(), replacing it with pci_update_resource(). pci_update_resource() uses pcibios_resource_to_bus() to convert a resource to a device BAR - the transformation should be exactly the same as the transformation used for the PCI bridges. pci_update_resource "knows" about 64-bit BARs, but doesn't attempt to set the high 32-bits to anything non-zero - currently no architecture attempts to do something different. If anyone cares, please fix; I'm going to reflect current behaviour for the time being. Ivan pointed out the following architectures need to examine their pcibios_update_resource() implementation - they should make sure that this new implementation does the right thing. #warning's have been added where appropriate. ia64 mips mips64 This cset also includes a fix for the problem reported by AKPM where 64-bit arch compilers complain about the resource mask being placed in a u32. <-- snip --> This patch removes the unused pcibios_update_resource() functions the kernel gained since, from FRV, m68k, mips & sh architectures. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* MODULE_LICENSE expects "GPL v2", not "GPLv2"Al Viro2008-05-211-1/+1
| | | | | | | | ... and we have few enough places using the latter to make it simpler to do search and replace... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* iomap: fix 64 bits resources on 32 bitsBenjamin Herrenschmidt2008-04-291-2/+2
| | | | | | | | | | | | | | Almost all implementations of pci_iomap() in the kernel, including the generic lib/iomap.c one, copies the content of a struct resource into unsigned long's which will break on 32 bits platforms with 64 bits resources. This fixes all definitions of pci_iomap() to use resource_size_t. I also "fixed" the 64bits arch for consistency. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* PCI: remove initial bios sort of PCI devices on x86Greg Kroah-Hartman2008-04-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently keep 2 lists of PCI devices in the system, one in the driver core, and one all on its own. This second list is sorted at boot time, in "BIOS" order, to try to remain compatible with older kernels (2.2 and earlier days). There was also a "nosort" option to turn this sorting off, to remain compatible with even older kernel versions, but that just ends up being what we have been doing from 2.5 days... Unfortunately, the second list of devices is not really ever used to determine the probing order of PCI devices or drivers[1]. That is done using the driver core list instead. This change happened back in the early 2.5 days. Relying on BIOS ording for the binding of drivers to specific device names is problematic for many reasons, and userspace tools like udev exist to properly name devices in a persistant manner if that is needed, no reliance on the BIOS is needed. Matt Domsch and others at Dell noticed this back in 2006, and added a boot option to sort the PCI device lists (both of them) in a breadth-first manner to help remain compatible with the 2.4 order, if needed for any reason. This option is not going away, as some systems rely on them. This patch removes the sorting of the internal PCI device list in "BIOS" mode, as it's not needed at all anymore, and hasn't for many years. I've also removed the PCI flags for this from some other arches that for some reason defined them, but never used them. This should not change the ordering of any drivers or device probing. [1] The old-style pci_get_device and pci_find_device() still used this sorting order, but there are very few drivers that use these functions, as they are deprecated for use in this manner. If for some reason, a driver rely on the order and uses these functions, the breadth-first boot option will resolve any problem. Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* arch/sh/drivers/dma/dma-sh.c: Correct use of ! and &Julia Lawall2008-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: revert dreamcast pci changeMagnus Damm2008-02-261-22/+22
| | | | | | | | | | Commit e036eaa681a17f71b64f6d9040fe605555623919 broke dreamcast pci, this patch fixes that by reverting the dreamcast specific bits. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: heartbeat: ioremap is expected to succeedRoel Kluin2008-02-261-1/+1
| | | | | | | ioremap is expected to succeed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix pci io access for r2d boardsMagnus Damm2008-02-141-1/+2
| | | | | | | | | | | | Use generic_io_base to point out the pci io window, and make sure the highest port address used is SH7751_PCI_IO_SIZE - 1. This patch fixes pci io port access for the r2d boards - CONFIG_8139TOO_PIO now works as expected. So does the alsa driver for CMI8738. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use ctrl_in/out for on chip pci accessMagnus Damm2008-02-146-37/+37
| | | | | | | | | | | This patch makes sure ctrl_inN/outN are used instead of inN/outN for on chip pci registers. Without this patch addresses may be adjusted using the value in generic_io_base. This patch makes it possible to set generic_io_base and have pci without reading and writing all over the place. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: remove unneeded castStephen Rothwell2008-02-141-1/+1
| | | | | | | now that platform_device_register_simple() takes a "const chat *". Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* PCI: Kconfig help: don't refer to the PCI-HOWTOAdrian Bunk2008-02-011-5/+0
| | | | | | | | | | A HOWTO that hasn't been updated for half a dozen years no longer "contains valuable information about which PCI hardware does work under Linux and which doesn't". Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sh: update r7780rp interrupt codeMagnus Damm2008-01-281-14/+2
| | | | | | | | | | | | | | | | | | This patch updates the board specific irq code for r7780rp. The new code is very similar to the other highlander implementations, with the exception that the r7780rp handles pci interrupts using IRL. To simplify the pci code and use the same interrupt numbers as r7780mp and r7785rp we hook in to the cpu specific pci vectors. The pci interrupts and the push switch all work well with and without this patch. CF and AX88796 are not ok though and the source of the problem is unknown at this point. The AX88796 does for not detect it's proper mac address (IPL gets it right) and the kernel hangs on CF access. As a workaround this patch removes the CF and the AX88796 from the platform datain case of r7780rp. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use declared coherent memory for dreamcast pci ethernet adapterMagnus Damm2008-01-283-72/+11
| | | | | | | | | | | This patch makes the dreamcast use the recently added declared coherent memory functions to point out the memory window suitable for dma. Apart from cleaning up, this gives the dreamcast a proper memory allocator for pci dma memory. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SDK7780 board.Nicholas Beck2008-01-283-0/+133
| | | | | | | Add support for Renesas Technology Europe SDK7780 board. Signed-off-by: Nicholas Beck <nbeck@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off dead HS771RVoIP board support.Paul Mundt2008-01-281-2/+0
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SH7763 CPU subtype.Yoshihiro Shimoda2008-01-284-1/+6
| | | | | Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SH7721 CPU subtype.Yoshihiro Shimoda2008-01-282-1/+3
| | | | | Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Get the SH-5 PCI support building.Paul Mundt2008-01-286-383/+270
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the rest of arch/sh64/kernel/.Paul Mundt2008-01-282-0/+643
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Driver core: change sysdev classes to use dynamic kobject namesKay Sievers2008-01-241-1/+1
| | | | | | | | | | All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sh: Support PCI IO access of SH7780 base boards.Nobuhiro Iwamatsu2007-11-302-4/+4
| | | | | | | | | The IO access of PCI is not supported in R7780RP and the MS7780SE board now. The support of the IO access mode of e100 and a lot of IDE chips becomes possible by fixing the code. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix PCI IO space base address of SH7780.Nobuhiro Iwamatsu2007-11-301-1/+1
| | | | | | | | PCI IO space base address of SH7780 was wrong. Change from 0xFE400000 to 0xFE200000. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the remaining ST40 cruft.Paul Mundt2007-11-073-625/+0
| | | | | | | | | | | | | The ST40 stuff in-tree hasn't built for some time, and hasn't been updated for over 3 years. ST maintains their own out-of-tree changes and rebases occasionally, and that's ultimately where all of the ST40 users go anyways. In order for the ST40 code to be brought up to date most of the stuff removed in this changeset would have to be rewritten anyways, so there's very little benefit in keeping the remnants around either. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ARRAY_SIZE() cleanupAlejandro Martinez Ruiz2007-10-301-2/+2
| | | | | | | | I'm converting most array size calculations under arch/ to use the ARRAY_SIZE() macro. This is the (tiny) patch for sh. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Remove dma_cache_(wback|inv|wback_inv) functionsRalf Baechle2007-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | dma_cache_(wback|inv|wback_inv) were the earliest attempt on a generalized cache managment API for I/O purposes. Originally it was basically the raw MIPS low level cache API exported to the entire world. The API has suffered from a lack of documentation, was not very widely used unlike it's more modern brothers and can easily be replaced by dma_cache_sync. So remove it rsp. turn the surviving bits back into an arch private API, as discussed on linux-arch. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Kyle McMartin <kyle@parisc-linux.org> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: Revert incorrect license string changes.Paul Mundt2007-09-241-1/+1
| | | | | | | These were right the first time. Either a thinko or building in the wrong tree. Revert this. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dma: Fix up build for SH7709 support.Kristoffer Ericson2007-09-211-0/+1
| | | | | | | Trivial build fixes for SH7709. Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: remove sh7780 interrupt controller hack from pci codeMagnus Damm2007-09-211-13/+0
| | | | | | | | | | This patch removes the sh778x specific pci code that pokes in the interrupt controller and overwrites things. The new and improved IRL code manages this in plat_irq_setup() and plat_irq_setup_pins() instead. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: More license string silliness.Paul Mundt2007-09-211-1/+1
| | | | | | 'GPL v2' vs 'GPLv2'. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: heartbeat driver update.Paul Mundt2007-09-211-19/+51
| | | | | | | | | Add some flags for the heartbeat driver, and kill off some duplication in the bit positions for the boards that don't have special cases. This also allows for variable access widths and inversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: intc - convert board specific r2d codeMagnus Damm2007-09-211-4/+4
| | | | | | | | | | | | | | | | | | | | | This patch converts the board specific interrupt code for r2d to make use of intc. While at it we improve the Kconfig to avoid confusion. - Two sets of interrupt tables exist - one for R2D-1 and one for R2D-PLUS. - R2D-1 and R2D-PLUS use the same irq constants. - R2D-1 has AX88796 support, R2D-PLUS does not hook up that IRQ. - R2D-PLUS has KEY support, R2D-1 does not hook up that IRQ. - The number and order of IRQ values are disconnected from register bits. - Interrupt sources now start from IRQ 100. - The machvec demux function converts from irlm IRQ 0-14 to IRQ 100++. Tested on R2D-1 and R2D-PLUS boards. Version 2 adds CONFIG_RTS7751R2D_1 and CONFIG_RTS7751R2D_PLUS together with intc structured as __initdata. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add SH7720 CPU support.Markus Brunner2007-09-212-3/+10
| | | | | | | | This adds support for the SH7720 (SH3-DSP) CPU. Signed-off by: Markus Brunner <super.firetwister@gmail.com> Signed-off by: Mark Jonas <toertel@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix Dreamcast DMA issues.Adrian McMenamin2007-07-241-3/+4
| | | | | | | | | | | | | The current SH DMA API is somewhat broken, not correctly matching virtual channel to the correct SH DMAC. This wasn't noticeable when using g2 DMA for the sound driver - one channel 0 is as good as any other! - but caused the pvr2 driver to fail. This patch fixes the pvr2 problem and consequently fixes the sound driver to ensure it continues to function. Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: heartbeat: Shut up resource size warning.Paul Mundt2007-07-201-1/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>