1 The code is rather based on trial-and-error than knowledge. Verified Via
2 Rhine functionality in PIO as well as MMIO mode.
4 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
5 Tested-by: Florian Fainelli <florian@openwrt.org>
7 arch/mips/pci/pci-rc32434.c | 11 +++++++++++
8 1 files changed, 11 insertions(+), 0 deletions(-)
10 diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c
11 index 1c2821e..71f7d27 100644
12 --- a/arch/mips/pci/pci-rc32434.c
13 +++ b/arch/mips/pci/pci-rc32434.c
14 @@ -205,6 +205,8 @@ static int __init rc32434_pcibridge_init(void)
16 static int __init rc32434_pci_init(void)
18 + void __iomem *io_map_base;
20 pr_info("PCI: Initializing PCI\n");
22 ioport_resource.start = rc32434_res_pci_io1.start;
23 @@ -212,6 +214,15 @@ static int __init rc32434_pci_init(void)
25 rc32434_pcibridge_init();
27 + io_map_base = ioremap(rc32434_res_pci_io1.start,
28 + rc32434_res_pci_io1.end - rc32434_res_pci_io1.start + 1);
33 + rc32434_controller.io_map_base =
34 + (unsigned long)io_map_base - rc32434_res_pci_io1.start;
36 register_pci_controller(&rc32434_controller);