aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/pci.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-02-03sh: Fix up early PCI PERR/SERR IRQ handling.Paul Mundt1-0/+12
This adds support for handling early PERR/SERR triggering in between controller registration and the initial bus scan. Buggy cards end up asserting these as soon as the M66EN scan is undertaken, resulting in an early crash. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-01sh: Improved multi-resource handling for SH7780 PCI.Paul Mundt1-2/+3
The SH7780 PCI controller supports 3 different ranges of PCI memory in addition to its PCI I/O window. In the case of 29-bit mode, only 2 memory windows are supported, while in 32-bit mode all 3 are visible. This attempts to make the resource handling completely dynamic and to permit platforms to map in as many apertures as they can handle. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-01sh: Hook up ERR/PERR/SERR detection for SH7780 PCI host controllers.Paul Mundt1-0/+11
These were never handled before, so implement some common infrastructure to support them, then make use of that in the SH7780-specific code. In practice there is little here that can not be generalized for SH4 parts, which will be an incremental change as the 7780/7751 code is gradually unified. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-01sh: Handle PCI controller resource conflicts.Paul Mundt1-1/+1
register_pci_controller() can fail, but presently is a void function. Change this over to an int so that we can bail early before continuing on with post-registration initialization (such as throwing the controller in to 66MHz mode in the case of the SH7780 host controller). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-01sh: Enable PCI66 support for SH7780 host controller.Paul Mundt1-0/+2
This adds some helper glue for scanning the bus and determining if all of the devices are 66MHz capable or not before flipping on 66MHz mode. This isn't quite to spec, but it's fairly consistent with what other embedded controllers end up having to do. Scanning code cribbed from the MIPS txx9 PCI code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-29sh: support PCI domains.Paul Mundt1-1/+12
Newer SH parts are now commonly shipping with multiple controllers, so we wire up PCI domain support to deal with them. Shamelessly cloned from the MIPS implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-29sh: Kill off deprecated fixed PCI memory window accessors.Paul Mundt1-14/+0
This kills off the deprected fixed memory range accessors for the cases of non-translatable ioremapping. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27sh: Revamp PCI DMA coherence Kconfig bits.Paul Mundt1-13/+7
Leaving this configurable caused more trouble than it was ever worth, so just make it explicit. Boards that are verified one way or the other can fix up their selects accordingly. We presently default to non-coherent for most platforms. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-20sh: Convert to asm-generic/dma-mapping-common.hPaul Mundt1-9/+1
This converts the old DMA mapping support to the new generic dma-mapping-common.h abstraction. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-09PCI: remove pcibios_scan_all_fns()Alex Chiang1-1/+0
This was #define'd as 0 on all platforms, so let's get rid of it. This change makes pci_scan_slot() slightly easier to read. Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Tony Luck <tony.luck@intel.com> Cc: David Howells <dhowells@redhat.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Russell King <linux@arm.linux.org.uk> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Kyle McMartin <kyle@mcmartin.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-17Delete pcibios_select_rootMatthew Wilcox1-13/+0
This function was only used by pci_claim_resource(), and the last commit deleted that use. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-26sh: pci: Disable MWI and make pci_dma_burst_advice() a bit more accurate.Paul Mundt1-2/+18
None of the SH PCI controllers support MWI, it is always treated as a direct memory write, so simply disable it outright. In the case of the PCI cache line size, consult that for the pci_dma_burst_advice() strategy, and switch over to PCI_DMA_BURST_MULTIPLE, as PPC64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-24sh: pci: Fix up the build for CONFIG_PCI=n.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Kill off the last remnants of the now unused pci-auto code.Paul Mundt1-16/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Kill off the now unused hose->io_base.Paul Mundt1-1/+0
Nothing is using this any more, so kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Track io and mem_offset per-channel.Paul Mundt1-0/+3
This implements a per-hose offset for I/O and mem resources. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: New-style controller registration.Paul Mundt1-11/+18
This moves off of the board_pci_channels[] approach for bus registration and over to a cleaner register_pci_controller(), all derived from the MIPS code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Rework fixed region checks in ioremap().Paul Mundt1-18/+11
Not all PCI channels have non-translatable memory windows, this is a special property of the on-chip PCIC with its 0xfd00... mapping, handle this explicitly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Consolidate pci_iomap() and use the generic I/O base.Paul Mundt1-20/+2
This consolidates the pci_iomap() definitions and reworks how the I/O port base is handled. PCI channels can register their own I/O map base, or if none is provided, the system-wide generic I/O base is used instead. Functionally nothing changes, while this allows us to kill off lots of I/O address special casing and lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Kill off unused pcibios_fixup().Paul Mundt1-1/+0
This is left over cruft that hasn't been used by anything in a long time, kill off bits that weren't purged previously. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Consolidate pcibios_align_resource() definitions.Paul Mundt1-4/+1
This introduces a saner pcibios_align_resource() that can be used regardless of whether pci-auto or pci-new are being used, and consolidates it in pci-lib.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: HAVE_PCI_MMAP support.Paul Mundt1-0/+3
Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20sh: pci: Drop asm-generic/pci.h, so we can use our own fixups.Paul Mundt1-3/+24
The new PCI code wants its own bus<->resource mappings instead of the generic equivalents, so drop the asm-generic include in preparation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: pci io port base address codeMagnus Damm1-27/+20
Adds a __get_pci_io_base() function which is used to match a port range against struct pci_channel. This allows us to detect if a port range is assigned to pci or happens to be legacy port io. While at it, remove unused cpu-specific cruft. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: pci memory range checking codeMagnus Damm1-4/+19
This patch changes the code to use __is_pci_memory() instead of is_pci_memaddr(). __is_pci_memory() loops through all the pci channels on the system to match memory windows. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: add io_base member to pci_channelMagnus Damm1-0/+1
Store the io window base address in struct pci_channel and use that one instead of SH77xx_PCI_IO_BASE. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: add reg_base member to pci_channelMagnus Damm1-0/+1
Store the base address of the pci host controller registers in struct pci_channel and use the address in pci_read_reg() and pci_write_reg(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: hook in struct pci_channel in sysdataMagnus Damm1-2/+4
Store a struct pci_channel pointer in bus->sysdata. This makes whatever struct pci_channel assigned to a bus available for sh4_pci_read() and sh4_pci_write(). We also modify PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to use bus->sysdata - this to gives us support for multiple pci channels. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: add init member to pci_channel dataMagnus Damm1-0/+2
This patch adds an init callback to struct pci_channel and makes sure it is initialized properly. Code is added to call this init function from pcibios_init(). Return values are adjusted and a warning is is printed if init fails. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-29sh: migrate to arch/sh/include/Paul Mundt1-0/+144
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>