sh: Improved multi-resource handling for SH7780 PCI.
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>
This commit is contained in:
@@ -25,25 +25,25 @@
|
||||
#include <asm/irq.h>
|
||||
#include <mach/pci.h>
|
||||
|
||||
static struct resource gapspci_io_resource = {
|
||||
.name = "GAPSPCI IO",
|
||||
.start = GAPSPCI_BBA_CONFIG,
|
||||
.end = GAPSPCI_BBA_CONFIG + GAPSPCI_BBA_CONFIG_SIZE - 1,
|
||||
.flags = IORESOURCE_IO,
|
||||
};
|
||||
|
||||
static struct resource gapspci_mem_resource = {
|
||||
.name = "GAPSPCI mem",
|
||||
.start = GAPSPCI_DMA_BASE,
|
||||
.end = GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
static struct resource gapspci_resources[] = {
|
||||
{
|
||||
.name = "GAPSPCI IO",
|
||||
.start = GAPSPCI_BBA_CONFIG,
|
||||
.end = GAPSPCI_BBA_CONFIG + GAPSPCI_BBA_CONFIG_SIZE - 1,
|
||||
.flags = IORESOURCE_IO,
|
||||
}, {
|
||||
.name = "GAPSPCI mem",
|
||||
.start = GAPSPCI_DMA_BASE,
|
||||
.end = GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pci_channel dreamcast_pci_controller = {
|
||||
.pci_ops = &gapspci_pci_ops,
|
||||
.io_resource = &gapspci_io_resource,
|
||||
.resources = gapspci_resources,
|
||||
.nr_resources = ARRAY_SIZE(gapspci_resources),
|
||||
.io_offset = 0x00000000,
|
||||
.mem_resource = &gapspci_mem_resource,
|
||||
.mem_offset = 0x00000000,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user