diff options
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ebd501a59abd..4394e545f9f7 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -557,7 +557,9 @@ unsigned long prom_memparse(const char *ptr, const char **retptr) | |||
557 | static void __init early_cmdline_parse(void) | 557 | static void __init early_cmdline_parse(void) |
558 | { | 558 | { |
559 | struct prom_t *_prom = &RELOC(prom); | 559 | struct prom_t *_prom = &RELOC(prom); |
560 | #ifdef CONFIG_PPC64 | ||
560 | const char *opt; | 561 | const char *opt; |
562 | #endif | ||
561 | char *p; | 563 | char *p; |
562 | int l = 0; | 564 | int l = 0; |
563 | 565 | ||
@@ -644,13 +646,13 @@ static unsigned char ibm_architecture_vec[] = { | |||
644 | 5 - 1, /* 5 option vectors */ | 646 | 5 - 1, /* 5 option vectors */ |
645 | 647 | ||
646 | /* option vector 1: processor architectures supported */ | 648 | /* option vector 1: processor architectures supported */ |
647 | 3 - 1, /* length */ | 649 | 3 - 2, /* length */ |
648 | 0, /* don't ignore, don't halt */ | 650 | 0, /* don't ignore, don't halt */ |
649 | OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 | | 651 | OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 | |
650 | OV1_PPC_2_04 | OV1_PPC_2_05, | 652 | OV1_PPC_2_04 | OV1_PPC_2_05, |
651 | 653 | ||
652 | /* option vector 2: Open Firmware options supported */ | 654 | /* option vector 2: Open Firmware options supported */ |
653 | 34 - 1, /* length */ | 655 | 34 - 2, /* length */ |
654 | OV2_REAL_MODE, | 656 | OV2_REAL_MODE, |
655 | 0, 0, | 657 | 0, 0, |
656 | W(0xffffffff), /* real_base */ | 658 | W(0xffffffff), /* real_base */ |
@@ -664,16 +666,16 @@ static unsigned char ibm_architecture_vec[] = { | |||
664 | 48, /* max log_2(hash table size) */ | 666 | 48, /* max log_2(hash table size) */ |
665 | 667 | ||
666 | /* option vector 3: processor options supported */ | 668 | /* option vector 3: processor options supported */ |
667 | 3 - 1, /* length */ | 669 | 3 - 2, /* length */ |
668 | 0, /* don't ignore, don't halt */ | 670 | 0, /* don't ignore, don't halt */ |
669 | OV3_FP | OV3_VMX, | 671 | OV3_FP | OV3_VMX, |
670 | 672 | ||
671 | /* option vector 4: IBM PAPR implementation */ | 673 | /* option vector 4: IBM PAPR implementation */ |
672 | 2 - 1, /* length */ | 674 | 2 - 2, /* length */ |
673 | 0, /* don't halt */ | 675 | 0, /* don't halt */ |
674 | 676 | ||
675 | /* option vector 5: PAPR/OF options */ | 677 | /* option vector 5: PAPR/OF options */ |
676 | 3 - 1, /* length */ | 678 | 3 - 2, /* length */ |
677 | 0, /* don't ignore, don't halt */ | 679 | 0, /* don't ignore, don't halt */ |
678 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, | 680 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, |
679 | }; | 681 | }; |
@@ -2030,6 +2032,39 @@ static void __init fixup_device_tree_maple(void) | |||
2030 | #define fixup_device_tree_maple() | 2032 | #define fixup_device_tree_maple() |
2031 | #endif | 2033 | #endif |
2032 | 2034 | ||
2035 | #ifdef CONFIG_PPC_CHRP | ||
2036 | /* Pegasos lacks the "ranges" property in the isa node */ | ||
2037 | static void __init fixup_device_tree_chrp(void) | ||
2038 | { | ||
2039 | phandle isa; | ||
2040 | u32 isa_ranges[6]; | ||
2041 | char *name; | ||
2042 | int rc; | ||
2043 | |||
2044 | name = "/pci@80000000/isa@c"; | ||
2045 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | ||
2046 | if (!PHANDLE_VALID(isa)) | ||
2047 | return; | ||
2048 | |||
2049 | rc = prom_getproplen(isa, "ranges"); | ||
2050 | if (rc != 0 && rc != PROM_ERROR) | ||
2051 | return; | ||
2052 | |||
2053 | prom_printf("Fixing up missing ISA range on Pegasos...\n"); | ||
2054 | |||
2055 | isa_ranges[0] = 0x1; | ||
2056 | isa_ranges[1] = 0x0; | ||
2057 | isa_ranges[2] = 0x01006000; | ||
2058 | isa_ranges[3] = 0x0; | ||
2059 | isa_ranges[4] = 0x0; | ||
2060 | isa_ranges[5] = 0x00010000; | ||
2061 | prom_setprop(isa, name, "ranges", | ||
2062 | isa_ranges, sizeof(isa_ranges)); | ||
2063 | } | ||
2064 | #else | ||
2065 | #define fixup_device_tree_chrp() | ||
2066 | #endif | ||
2067 | |||
2033 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) | 2068 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) |
2034 | static void __init fixup_device_tree_pmac(void) | 2069 | static void __init fixup_device_tree_pmac(void) |
2035 | { | 2070 | { |
@@ -2077,6 +2112,7 @@ static void __init fixup_device_tree_pmac(void) | |||
2077 | static void __init fixup_device_tree(void) | 2112 | static void __init fixup_device_tree(void) |
2078 | { | 2113 | { |
2079 | fixup_device_tree_maple(); | 2114 | fixup_device_tree_maple(); |
2115 | fixup_device_tree_chrp(); | ||
2080 | fixup_device_tree_pmac(); | 2116 | fixup_device_tree_pmac(); |
2081 | } | 2117 | } |
2082 | 2118 | ||