aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/drivers
AgeCommit message (Collapse)AuthorFilesLines
2009-04-20sh: pci: Consolidate lboxre2 and r2d IRQ fixups.Paul Mundt4-57/+26
Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Rename SH7751 platform ops files to fixups.Paul Mundt5-4/+4
None of these contain pci_ops, only IRQ routing bits, rename them accordingly. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Rewrite SH7751 PCI support to follow SH7780.Paul Mundt10-305/+76
This follows the similar sort of scheme that the refactored SH7780 code uses, using a 64MB CS3 mapping to handle the window0 case, and simply discarding window1. This vastly simplifies the code, and allows most of the board-specific setup to go die. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Rename ops-cayman -> fixups-cayman.Paul Mundt2-1/+1
Now that ops-cayman.c only contains IRQ routing fixups, rename it. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Convert the SH-5 code over to the new interface.Paul Mundt4-52/+23
Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Tidy up the dreamcast PCI support.Paul Mundt3-89/+117
Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Kill off legacy ide quirks.Paul Mundt2-42/+0
These fixups seem to have bitrotted a bit since their introduction in the 2.4 days. As we never had much use for them in the first place, and nothing is using them any more, kill them off the rest of the way. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Consolidate pcibios_setup() in pci-lib.Paul Mundt4-35/+16
This wasn't really being used for anything useful, so just stub it in pci-lib. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Flag the dreamcast BBA as IORESOURCE_PCI_FIXED.Paul Mundt1-0/+7
This isn't a real BAR, so prevent any attempts to move it, as we don't wish to encourage a bus luck by overzealous PCI initialization code. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Kill off superfluous lboxre2 pci fixups.Paul Mundt2-43/+1
This is a verbatim copy of the r2d one, use that instead. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Kill off the now unused hose->io_base.Paul Mundt2-9/+0
Nothing is using this any more, so kill it off. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Consolidate the remaining common bits.Paul Mundt3-116/+64
This moves the remaining common bits in to pci-lib. Thereby reducing pci.c/pci-new.c to simple bus fixups and controller registration. As more platforms are moved over, the old code will disappear completely and the pci-new bits will be rolled in to pci-lib, eventually replacing pci.c completely. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Consolidate bus<->resource mapping in pci-lib.Paul Mundt3-45/+31
Now that the io and mem offsets are tracked accordingly, the pci-new version of the bus<->resource mappers can be used generically. This moves them in to pci-lib. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Track io and mem_offset per-channel.Paul Mundt2-9/+11
This implements a per-hose offset for I/O and mem resources. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: New-style controller registration.Paul Mundt2-72/+112
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 <[email protected]>
2009-04-20sh: pci: Consolidate pci_iomap() and use the generic I/O base.Paul Mundt3-70/+51
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 <[email protected]>
2009-04-20sh: pci: Kill off unused pcibios_fixup().Paul Mundt1-5/+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 <[email protected]>
2009-04-20sh: pci: Consolidate pcibios_align_resource() definitions.Paul Mundt3-46/+42
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 <[email protected]>
2009-04-20sh: pci: HAVE_PCI_MMAP support.Paul Mundt2-3/+29
Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Split out new-style PCI core.Paul Mundt3-4/+258
This splits off a 'pci-new.c' which is aimed at gradually replacing the pci-auto backend and the arch/sh/drivers/pci/pci.c core respectively. Signed-off-by: Paul Mundt <[email protected]>
2009-04-20sh: pci: Drop asm-generic/pci.h, so we can use our own fixups.Paul Mundt1-0/+14
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 <[email protected]>
2009-04-17sh: pci: Start unifying the SH7780 PCIC initialization.Paul Mundt4-70/+37
This starts moving out the common initialization bits from the various fixup paths in to the shared init path. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Consolidate SH7780 PCIC IRQ routing.Paul Mundt7-137/+31
Now that the platform code is a bit leaner, we can start consolidating the various IRQ routing implementations. There are effectively only 2 variants, and the others can use those directly. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Kill off platform-specific multi-window mappings.Paul Mundt6-95/+16
Commit 68b42d1b548be1840aff7122fdebeb804daf0fa3 ("sh: sh7785lcr: Map whole PCI address space.") changed around the semantics of how various chip-selects are made accessible to PCI. Now that there is a single large mapping covering from CS0-CS6, there is no longer any need to do multi-window mapping. Subsequently, all of the differing implementations can be consolidated in to pci-sh7780. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Consolidate PCI I/O and mem window definitions for SH7780.Paul Mundt6-90/+27
This consolidates all of the PCI I/O and memory window definitions across the pci-sh7780 users in pci-sh7780 itself. No functional changes, in that every platform had exactly the same implementation. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Set the I/O port base to the SH7780 I/O window default.Paul Mundt1-0/+2
Presently the I/O port base isn't being set anywhere, which allows things like generic_inl() to blow up. Fix this up to point at the PCI IO window. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Set pci_cache_line_size on SH7780 via the PCICLS register.Paul Mundt1-9/+12
The SH7780 PCIC contains a read-only cache line size register that we can derive pci_cache_line_size from. So, make sure that the software idea of the cache line size actually matches the host controller's idea. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Use the proper write size for class/sub-class code.Paul Mundt1-2/+4
Don't use pci_write_reg() for these, as it defaults to 32-bit. Rather than using the helper, use __raw_writeb() directly. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Rework SH7780 host controller detection.Paul Mundt2-21/+26
This reworks how the host controller is probed, and makes it a bit more verbose in the event a new type of controller is detected. Additionally, we also log the revision information. This now uses the proper access sizes for the vendor/device registers, rather than relying on a larger access that encapsulated both of them. Not all devices support 32-bit read cycles for these registers. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Set class/sub-class code correctly for SH7780 PCIC.Paul Mundt2-8/+3
The SH7780 PCI host controller implements a configuration header that requires a fair bit of hand-holding to initialize properly. By default it appears as a pre-2.0 host controller given the zeroed out class code, so fix this up properly. Some boards that happened to be using the R7780RP version of the PCIC fixups had set this correctly, but this belongs in the standard initialization, and is by no means board specific. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Prefer P1SEG over P1SEGADDR for CONFIG_CMD.Paul Mundt1-3/+3
P1SEGADDR is obsolete and will be killed off completely in the future, so transition off of it and reference P1SEG explicitly. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Move se7780 INTC fixups out of pci-sh7780.c.Paul Mundt1-24/+0
These fixups belong in the board INTC setup code, not in the middle of pci-sh7780.c. Signed-off-by: Paul Mundt <[email protected]>
2009-04-17sh: pci: Kill off useless debugging printk() in pci-sh7780 init.Paul Mundt1-12/+0
Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: pci: Kill off unused SH4_PCIC_NO_RESET code.Paul Mundt12-58/+0
Nothing ended up using this anymore, so just kill it off. Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: pci: drop duplicate PCIC fixups for SE7780 and SH7785LCR.Paul Mundt3-111/+2
SE7780 has the same PCIC fixup as SDK7780, and SH7785LCR the same as R7780RP. Switch to using those, and drop the duplicate code. Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: sh7785lcr: Update for recent PCI changes.Paul Mundt2-18/+19
Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: drop duplicate symbol export on dreamcast and sh7785lcr.Paul Mundt2-2/+0
With board_pci_channels now being exported in a single place, update the boards that duplicated the export. Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: export board_pci_channels in one placeMagnus Damm8-8/+2
Instead of sometimes exporting board_pci_channels[] in the board specific code just export it in one place. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: pci io port base address codeMagnus Damm1-1/+0
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: pci memory range checking codeMagnus Damm1-3/+2
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: add io_base member to pci_channelMagnus Damm2-4/+6
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: add reg_base member to pci_channelMagnus Damm6-6/+8
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: hook in struct pci_channel in sysdataMagnus Damm2-5/+8
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: avoid using PCIBIOS_MIN_xxxMagnus Damm6-20/+19
Replaces PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM with direct struct pci_channel access. This allows us to have more than one pci channel. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: add init member to pci_channel dataMagnus Damm18-36/+54
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-16sh: pass along struct pci_channelMagnus Damm19-149/+164
These patches rework the pci code for the sh architecture. Currently each board implements some kind of ioport to address mapping. Some boards use generic_io_base others try passing addresses as io ports. This is the first set of patches that try to unify the pci code as much as possible to avoid duplicated code. This will in the end lead to fewer lines board specific code and more generic code. This patch makes sure a struct pci_channel pointer is passed along to various pci functions such as pci_read_reg(), pci_write_reg(), pci_fixup_pcic(), sh7751_pcic_init() and sh7780_pcic_init(). Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-14sh: Add in PCI bus for DMA API debugging.Paul Mundt1-0/+3
This adds in the pci_bus_type for DMA API debug. Signed-off-by: Paul Mundt <[email protected]>
2009-04-06sh: sh7785lcr: fix PCI address map for 32-bit modeYoshihiro Shimoda2-0/+7
Fix the problem that cannot work PCI device on 32-bit mode because influence of the commit 68b42d1b548be1840aff7122fdebeb804daf0fa3 ("sh: sh7785lcr: Map whole PCI address space."). So this patch was implement like a 29-bit mode, map whole physical address space of DDR-SDRAM. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-04sh: sh7785lcr: Map whole PCI address space.Takashi Yoshii2-17/+8
PCI still doesn't work on sh7785lcr 29bit 256M map mode. On SH7785, PCI -> SHwy address translation is not base+offset but somewhat like base|offset (See HW Manual (rej09b0261) Fig. 13.11). So, you can't export CS2,3,4,5 by 256M at CS2 (results CS0,1,2,3 exported, I guess). There are two candidates. a) 128M@CS2 + 128M@CS4 b) 512M@CS0 Attached patch is B. It maps 512M Byte at 0 independently of memory size. It results CS0 to CS6 and perhaps some more being accessible from PCI. Tested on 7785lcr 29bit 128M map 7785lcr 29bit 256M map (NOT tested on 32bit) Signed-off-by: Takashi YOSHII <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-04sh: Fix up number of on-chip DMA channels on SH7091.Paul Mundt1-8/+12
This accidentally regressed when the multi-IRQ changes went in, switching SH7091 from 4 to 6 channels. Add SH7091 back in to the 4-channel dependency list. Reported-by: Adrian McMenamin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>