sh: hook in struct pci_channel in sysdata
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>
This commit is contained in:
@@ -31,8 +31,10 @@ struct pci_channel {
|
||||
*/
|
||||
extern struct pci_channel board_pci_channels[];
|
||||
|
||||
#define PCIBIOS_MIN_IO board_pci_channels->io_resource->start
|
||||
#define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
|
||||
/* ugly as hell, but makes drivers/pci/setup-res.c compile and work */
|
||||
#define __PCI_CHAN(bus) ((struct pci_channel *)bus->sysdata)
|
||||
#define PCIBIOS_MIN_IO __PCI_CHAN(bus)->io_resource->start
|
||||
#define PCIBIOS_MIN_MEM __PCI_CHAN(bus)->mem_resource->start
|
||||
|
||||
/*
|
||||
* I/O routine helpers
|
||||
|
Reference in New Issue
Block a user