1
0

io_map_base.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. diff -Nur linux-2.6.28.orig/arch/mips/include/asm/mips-boards/generic.h linux-2.6.28/arch/mips/include/asm/mips-boards/generic.h
  2. --- linux-2.6.28.orig/arch/mips/include/asm/mips-boards/generic.h 2008-12-25 00:26:37.000000000 +0100
  3. +++ linux-2.6.28/arch/mips/include/asm/mips-boards/generic.h 2009-01-09 23:03:02.000000000 +0100
  4. @@ -92,7 +92,7 @@
  5. extern void mips_reboot_setup(void);
  6. #ifdef CONFIG_PCI
  7. -extern void mips_pcibios_init(void);
  8. +extern int mips_pcibios_init(void);
  9. #else
  10. #define mips_pcibios_init() do { } while (0)
  11. #endif
  12. diff -Nur linux-2.6.28.orig/arch/mips/mti-malta/malta-pci.c linux-2.6.28/arch/mips/mti-malta/malta-pci.c
  13. --- linux-2.6.28.orig/arch/mips/mti-malta/malta-pci.c 2008-12-25 00:26:37.000000000 +0100
  14. +++ linux-2.6.28/arch/mips/mti-malta/malta-pci.c 2009-01-09 23:02:02.000000000 +0100
  15. @@ -87,10 +87,11 @@
  16. .mem_resource = &msc_mem_resource,
  17. };
  18. -void __init mips_pcibios_init(void)
  19. +int __init mips_pcibios_init(void)
  20. {
  21. struct pci_controller *controller;
  22. resource_size_t start, end, map, start1, end1, map1, map2, map3, mask;
  23. + void __iomem *io_map_base;
  24. switch (mips_revision_sconid) {
  25. case MIPS_REVISION_SCON_GT64120:
  26. @@ -230,7 +231,7 @@
  27. controller = &msc_controller;
  28. break;
  29. default:
  30. - return;
  31. + return 0;
  32. }
  33. if (controller->io_resource->start < 0x00001000UL) /* FIXME */
  34. @@ -239,5 +240,14 @@
  35. iomem_resource.end &= 0xfffffffffULL; /* 64 GB */
  36. ioport_resource.end = controller->io_resource->end;
  37. + io_map_base = ioremap(MIPS_MSC01_PCI_REG_BASE,
  38. + controller->io_resource->end - controller->io_resource->start + 1);
  39. + if (!io_map_base)
  40. + return -EBUSY;
  41. +
  42. + controller->io_map_base = (unsigned long)io_map_base;
  43. +
  44. register_pci_controller(controller);
  45. +
  46. + return 0;
  47. }