diff options
Diffstat (limited to 'arch/sh/drivers/pci')
| -rw-r--r-- | arch/sh/drivers/pci/fixups-dreamcast.c | 18 | ||||
| -rw-r--r-- | arch/sh/drivers/pci/pci.c | 5 | ||||
| -rw-r--r-- | arch/sh/drivers/pci/pcie-sh7786.h | 3 | 
3 files changed, 15 insertions, 11 deletions
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c index d6cde700e31..1d1c5a227e5 100644 --- a/arch/sh/drivers/pci/fixups-dreamcast.c +++ b/arch/sh/drivers/pci/fixups-dreamcast.c @@ -31,6 +31,8 @@  static void gapspci_fixup_resources(struct pci_dev *dev)  {  	struct pci_channel *p = dev->sysdata; +	struct resource res; +	struct pci_bus_region region;  	printk(KERN_NOTICE "PCI: Fixing up device %s\n", pci_name(dev)); @@ -50,11 +52,21 @@ static void gapspci_fixup_resources(struct pci_dev *dev)  		/*  		 * Redirect dma memory allocations to special memory window. +		 * +		 * If this GAPSPCI region were mapped by a BAR, the CPU +		 * phys_addr_t would be pci_resource_start(), and the bus +		 * address would be pci_bus_address(pci_resource_start()). +		 * But apparently there's no BAR mapping it, so we just +		 * "know" its CPU address is GAPSPCI_DMA_BASE.  		 */ +		res.start = GAPSPCI_DMA_BASE; +		res.end = GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE - 1; +		res.flags = IORESOURCE_MEM; +		pcibios_resource_to_bus(dev->bus, ®ion, &res);  		BUG_ON(!dma_declare_coherent_memory(&dev->dev, -						GAPSPCI_DMA_BASE, -						GAPSPCI_DMA_BASE, -						GAPSPCI_DMA_SIZE, +						res.start, +						region.start, +						resource_size(&res),  						DMA_MEMORY_MAP |  						DMA_MEMORY_EXCLUSIVE));  		break; diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 60ed3e1c4b7..1bc09ee7948 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c @@ -186,11 +186,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,  	return start;  } -int pcibios_enable_device(struct pci_dev *dev, int mask) -{ -	return pci_enable_resources(dev, mask); -} -  static void __init  pcibios_bus_report_status_early(struct pci_channel *hose,  				int top_bus, int current_bus, diff --git a/arch/sh/drivers/pci/pcie-sh7786.h b/arch/sh/drivers/pci/pcie-sh7786.h index 1ee054e47ea..4a6ff55f759 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.h +++ b/arch/sh/drivers/pci/pcie-sh7786.h @@ -145,9 +145,6 @@  /*	PCIERMSGIER	*/  #define	SH4A_PCIERMSGIER	(0x004040)	/* R/W - 0x0000 0000 32 */ -/*	PCIEPHYCTLR	*/ -#define SH4A_PCIEPHYCTLR	(0x010000)	/* R/W - 0x0000 0000 32 */ -  /*	PCIEPHYADRR	*/  #define	SH4A_PCIEPHYADRR	(0x010004)	/* R/W - 0x0000 0000 32 */  #define		BITS_ACK	(24)			// Rev1.171  | 
