diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 16:32:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 16:32:24 -0400 |
commit | 62933d36ac98360da45f43df989277df002b034b (patch) | |
tree | 1164d4f10bb56b757f0507ed49d7aa4b17a9dc2b /arch/powerpc/kernel | |
parent | 0ab598099c18affd73a21482274c00e8119236be (diff) | |
parent | f64071200acc124bd0d641ef7d750f38fbf5f8b8 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (24 commits)
[POWERPC] Fix compile error with kexec and CONFIG_SMP=n
[POWERPC] Split initrd logic out of early_init_dt_scan_chosen() to fix warning
[POWERPC] Fix warning in hpte_decode(), and generalize it
[POWERPC] Minor pSeries IOMMU debug cleanup
[POWERPC] PS3: Fix sys manager build error
[POWERPC] Assorted janitorial EEH cleanups
[POWERPC] We don't define CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
[POWERPC] pmu_sys_suspended is only defined for PPC32
[POWERPC] Fix incorrect calculation of I/O window addresses
[POWERPC] celleb: Update celleb_defconfig
[POWERPC] celleb: Fix parsing of machine type hack command line option
[POWERPC] celleb: Fix PCI config space accesses to subordinate buses
[POWERPC] celleb: Fix support for multiple PCI domains
[POWERPC] Wire up sys_utimensat
[POWERPC] CPM_UART: Removed __init from cpm_uart_init_portdesc to fix warning
[POWERPC] User rheap from arch/powerpc/lib
[POWERPC] 83xx: Fix the PCI ranges in the MPC834x_MDS device tree.
[POWERPC] 83xx: Fix the PCI ranges in the MPC832x_MDS device tree.
[POWERPC] CPM_UART: cpm_uart_set_termios should take ktermios, not termios
[POWERPC] Change rheap functions to use ulongs instead of pointers
...
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 37 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 47 |
2 files changed, 44 insertions, 40 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 6d05a1f377b5..b0409e19b1c1 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -1098,35 +1098,24 @@ static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, | |||
1098 | unsigned long *start_virt, unsigned long *size) | 1098 | unsigned long *start_virt, unsigned long *size) |
1099 | { | 1099 | { |
1100 | struct pci_controller *hose = pci_bus_to_host(bus); | 1100 | struct pci_controller *hose = pci_bus_to_host(bus); |
1101 | struct pci_bus_region region; | ||
1102 | struct resource *res; | 1101 | struct resource *res; |
1103 | 1102 | ||
1104 | if (bus->self) { | 1103 | if (bus->self) |
1105 | res = bus->resource[0]; | 1104 | res = bus->resource[0]; |
1106 | pcibios_resource_to_bus(bus->self, ®ion, res); | 1105 | else |
1107 | *start_phys = hose->io_base_phys + region.start; | ||
1108 | *start_virt = (unsigned long) hose->io_base_virt + | ||
1109 | region.start; | ||
1110 | if (region.end > region.start) | ||
1111 | *size = region.end - region.start + 1; | ||
1112 | else { | ||
1113 | printk("%s(): unexpected region 0x%lx->0x%lx\n", | ||
1114 | __FUNCTION__, region.start, region.end); | ||
1115 | return 1; | ||
1116 | } | ||
1117 | |||
1118 | } else { | ||
1119 | /* Root Bus */ | 1106 | /* Root Bus */ |
1120 | res = &hose->io_resource; | 1107 | res = &hose->io_resource; |
1121 | *start_phys = hose->io_base_phys + res->start; | 1108 | |
1122 | *start_virt = (unsigned long) hose->io_base_virt + res->start; | 1109 | *start_virt = pci_io_base + res->start; |
1123 | if (res->end > res->start) | 1110 | *start_phys = *start_virt + hose->io_base_phys |
1124 | *size = res->end - res->start + 1; | 1111 | - (unsigned long) hose->io_base_virt; |
1125 | else { | 1112 | |
1126 | printk("%s(): unexpected region 0x%lx->0x%lx\n", | 1113 | if (res->end > res->start) |
1127 | __FUNCTION__, res->start, res->end); | 1114 | *size = res->end - res->start + 1; |
1128 | return 1; | 1115 | else { |
1129 | } | 1116 | printk("%s(): unexpected region 0x%lx->0x%lx\n", |
1117 | __FUNCTION__, res->start, res->end); | ||
1118 | return 1; | ||
1130 | } | 1119 | } |
1131 | 1120 | ||
1132 | return 0; | 1121 | return 0; |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index caef555f2dc0..c065b5550368 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -716,11 +716,40 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
716 | return 0; | 716 | return 0; |
717 | } | 717 | } |
718 | 718 | ||
719 | #ifdef CONFIG_BLK_DEV_INITRD | ||
720 | static void __init early_init_dt_check_for_initrd(unsigned long node) | ||
721 | { | ||
722 | unsigned long l; | ||
723 | u32 *prop; | ||
724 | |||
725 | DBG("Looking for initrd properties... "); | ||
726 | |||
727 | prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l); | ||
728 | if (prop) { | ||
729 | initrd_start = (unsigned long)__va(of_read_ulong(prop, l/4)); | ||
730 | |||
731 | prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l); | ||
732 | if (prop) { | ||
733 | initrd_end = (unsigned long) | ||
734 | __va(of_read_ulong(prop, l/4)); | ||
735 | initrd_below_start_ok = 1; | ||
736 | } else { | ||
737 | initrd_start = 0; | ||
738 | } | ||
739 | } | ||
740 | |||
741 | DBG("initrd_start=0x%lx initrd_end=0x%lx\n", initrd_start, initrd_end); | ||
742 | } | ||
743 | #else | ||
744 | static inline void early_init_dt_check_for_initrd(unsigned long node) | ||
745 | { | ||
746 | } | ||
747 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
748 | |||
719 | static int __init early_init_dt_scan_chosen(unsigned long node, | 749 | static int __init early_init_dt_scan_chosen(unsigned long node, |
720 | const char *uname, int depth, void *data) | 750 | const char *uname, int depth, void *data) |
721 | { | 751 | { |
722 | unsigned long *lprop; | 752 | unsigned long *lprop; |
723 | u32 *prop; | ||
724 | unsigned long l; | 753 | unsigned long l; |
725 | char *p; | 754 | char *p; |
726 | 755 | ||
@@ -762,21 +791,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
762 | crashk_res.end = crashk_res.start + *lprop - 1; | 791 | crashk_res.end = crashk_res.start + *lprop - 1; |
763 | #endif | 792 | #endif |
764 | 793 | ||
765 | #ifdef CONFIG_BLK_DEV_INITRD | 794 | early_init_dt_check_for_initrd(node); |
766 | DBG("Looking for initrd properties... "); | ||
767 | prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l); | ||
768 | if (prop) { | ||
769 | initrd_start = (unsigned long)__va(of_read_ulong(prop, l/4)); | ||
770 | prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l); | ||
771 | if (prop) { | ||
772 | initrd_end = (unsigned long)__va(of_read_ulong(prop, l/4)); | ||
773 | initrd_below_start_ok = 1; | ||
774 | } else { | ||
775 | initrd_start = 0; | ||
776 | } | ||
777 | } | ||
778 | DBG("initrd_start=0x%lx initrd_end=0x%lx\n", initrd_start, initrd_end); | ||
779 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
780 | 795 | ||
781 | /* Retreive command line */ | 796 | /* Retreive command line */ |
782 | p = of_get_flat_dt_prop(node, "bootargs", &l); | 797 | p = of_get_flat_dt_prop(node, "bootargs", &l); |