diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-02-19 07:34:55 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-16 03:00:13 -0400 |
commit | b6706ef10f75921733d7275fd45d268f2f6254c8 (patch) | |
tree | dfaf33eb6634b7d3fb9d53ddf92f7bbfcf69e45c /arch/sh/include/asm/pci.h | |
parent | 710fa3c81151948ac4d836ef52b57cef91b0ab72 (diff) |
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>
Diffstat (limited to 'arch/sh/include/asm/pci.h')
-rw-r--r-- | arch/sh/include/asm/pci.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index 5c7a8f1d2d54..386587e08830 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
@@ -31,8 +31,10 @@ struct pci_channel { | |||
31 | */ | 31 | */ |
32 | extern struct pci_channel board_pci_channels[]; | 32 | extern struct pci_channel board_pci_channels[]; |
33 | 33 | ||
34 | #define PCIBIOS_MIN_IO board_pci_channels->io_resource->start | 34 | /* ugly as hell, but makes drivers/pci/setup-res.c compile and work */ |
35 | #define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start | 35 | #define __PCI_CHAN(bus) ((struct pci_channel *)bus->sysdata) |
36 | #define PCIBIOS_MIN_IO __PCI_CHAN(bus)->io_resource->start | ||
37 | #define PCIBIOS_MIN_MEM __PCI_CHAN(bus)->mem_resource->start | ||
36 | 38 | ||
37 | /* | 39 | /* |
38 | * I/O routine helpers | 40 | * I/O routine helpers |