Skip to content

Commit

Permalink
MIPS: RC32434: Define io_map_base for PCI controller
Browse files Browse the repository at this point in the history
The code is rather based on trial-and-error than knowledge. Verified Via
Rhine functionality in PIO as well as MMIO mode.

[Looks sane -- Ralf]

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Phil Sutter authored and Ralf Baechle committed Jan 30, 2009
1 parent 5379a5f commit fb91e2c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/mips/pci/pci-rc32434.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,24 @@ static int __init rc32434_pcibridge_init(void)

static int __init rc32434_pci_init(void)
{
void __iomem *io_map_base;

pr_info("PCI: Initializing PCI\n");

ioport_resource.start = rc32434_res_pci_io1.start;
ioport_resource.end = rc32434_res_pci_io1.end;

rc32434_pcibridge_init();

io_map_base = ioremap(rc32434_res_pci_io1.start,
rc32434_res_pci_io1.end - rc32434_res_pci_io1.start + 1);

if (!io_map_base)
return -ENOMEM;

rc32434_controller.io_map_base =
(unsigned long)io_map_base - rc32434_res_pci_io1.start;

register_pci_controller(&rc32434_controller);
rc32434_sync();

Expand Down

0 comments on commit fb91e2c

Please sign in to comment.