Kumar Gala | af5b326 | 2008-06-06 13:12:18 -0500 | [diff] [blame] | 1 | /* |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 2 | * Copyright 2004 Freescale Semiconductor. |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 3 | * (C) Copyright 2002,2003, Motorola Inc. |
| 4 | * Xianghua Xiao, (X.Xiao@motorola.com) |
| 5 | * |
| 6 | * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com> |
| 7 | * |
| 8 | * See file CREDITS for list of people who contributed to this |
| 9 | * project. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU General Public License as |
| 13 | * published by the Free Software Foundation; either version 2 of |
| 14 | * the License, or (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the Free Software |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 24 | * MA 02111-1307 USA |
| 25 | */ |
| 26 | |
| 27 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 28 | #include <common.h> |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 29 | #include <pci.h> |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 30 | #include <asm/processor.h> |
Kumar Gala | af5b326 | 2008-06-06 13:12:18 -0500 | [diff] [blame] | 31 | #include <asm/mmu.h> |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 32 | #include <asm/immap_85xx.h> |
Kumar Gala | af5b326 | 2008-06-06 13:12:18 -0500 | [diff] [blame] | 33 | #include <asm/fsl_ddr_sdram.h> |
Kumar Gala | 6e57840 | 2007-11-28 22:54:27 -0600 | [diff] [blame] | 34 | #include <libfdt.h> |
| 35 | #include <fdt_support.h> |
Matthew McClintock | 148e26a | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 36 | |
Jon Loeliger | 77a4f6e | 2005-07-25 14:05:07 -0500 | [diff] [blame] | 37 | #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 38 | extern void ddr_enable_ecc(unsigned int dram_size); |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 39 | #endif |
| 40 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 41 | void local_bus_init(void); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 42 | void sdram_init(void); |
| 43 | long int fixed_sdram(void); |
| 44 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 45 | int checkboard (void) |
| 46 | { |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 47 | puts("Board: ADS\n"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 48 | |
| 49 | #ifdef CONFIG_PCI |
| 50 | printf(" PCI1: 32 bit, %d MHz (compiled)\n", |
| 51 | CONFIG_SYS_CLK_FREQ / 1000000); |
| 52 | #else |
| 53 | printf(" PCI1: disabled\n"); |
| 54 | #endif |
| 55 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 56 | /* |
| 57 | * Initialize local bus. |
| 58 | */ |
| 59 | local_bus_init(); |
| 60 | |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 61 | return 0; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 62 | } |
| 63 | |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 64 | |
Becky Bruce | bd99ae7 | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 65 | phys_size_t |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 66 | initdram(int board_type) |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 67 | { |
| 68 | long dram_size = 0; |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 69 | |
| 70 | puts("Initializing\n"); |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 71 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 72 | #if defined(CONFIG_DDR_DLL) |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 73 | { |
Kumar Gala | ec1340d | 2007-11-27 23:25:02 -0600 | [diff] [blame] | 74 | volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR); |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 75 | uint temp_ddrdll = 0; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 76 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 77 | /* |
| 78 | * Work around to stabilize DDR DLL |
| 79 | */ |
| 80 | temp_ddrdll = gur->ddrdllcr; |
| 81 | gur->ddrdllcr = ((temp_ddrdll & 0xff) << 16) | 0x80000000; |
| 82 | asm("sync;isync;msync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 83 | } |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 84 | #endif |
| 85 | |
Kumar Gala | af5b326 | 2008-06-06 13:12:18 -0500 | [diff] [blame] | 86 | #ifdef CONFIG_SPD_EEPROM |
| 87 | dram_size = fsl_ddr_sdram(); |
| 88 | dram_size = setup_ddr_tlbs(dram_size / 0x100000); |
| 89 | |
| 90 | dram_size *= 0x100000; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 91 | #else |
Kumar Gala | af5b326 | 2008-06-06 13:12:18 -0500 | [diff] [blame] | 92 | dram_size = fixed_sdram(); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 93 | #endif |
| 94 | |
Jon Loeliger | 77a4f6e | 2005-07-25 14:05:07 -0500 | [diff] [blame] | 95 | #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 96 | /* |
| 97 | * Initialize and enable DDR ECC. |
| 98 | */ |
| 99 | ddr_enable_ecc(dram_size); |
| 100 | #endif |
| 101 | |
| 102 | /* |
| 103 | * Initialize SDRAM. |
| 104 | */ |
| 105 | sdram_init(); |
| 106 | |
| 107 | puts(" DDR: "); |
| 108 | return dram_size; |
| 109 | } |
| 110 | |
| 111 | |
| 112 | /* |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 113 | * Initialize Local Bus |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 114 | */ |
| 115 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 116 | void |
| 117 | local_bus_init(void) |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 118 | { |
Kumar Gala | ec1340d | 2007-11-27 23:25:02 -0600 | [diff] [blame] | 119 | volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR); |
Kumar Gala | 0a7a097 | 2007-11-29 02:10:09 -0600 | [diff] [blame] | 120 | volatile ccsr_lbc_t *lbc = (void *)(CFG_MPC85xx_LBC_ADDR); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 121 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 122 | uint clkdiv; |
| 123 | uint lbc_hz; |
| 124 | sys_info_t sysinfo; |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 125 | |
| 126 | /* |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 127 | * Errata LBC11. |
| 128 | * Fix Local Bus clock glitch when DLL is enabled. |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 129 | * |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 130 | * If localbus freq is < 66Mhz, DLL bypass mode must be used. |
| 131 | * If localbus freq is > 133Mhz, DLL can be safely enabled. |
| 132 | * Between 66 and 133, the DLL is enabled with an override workaround. |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 133 | */ |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 134 | |
| 135 | get_sys_info(&sysinfo); |
| 136 | clkdiv = lbc->lcrr & 0x0f; |
| 137 | lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv; |
| 138 | |
| 139 | if (lbc_hz < 66) { |
| 140 | lbc->lcrr = CFG_LBC_LCRR | 0x80000000; /* DLL Bypass */ |
| 141 | |
| 142 | } else if (lbc_hz >= 133) { |
| 143 | lbc->lcrr = CFG_LBC_LCRR & (~0x80000000); /* DLL Enabled */ |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 144 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 145 | } else { |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 146 | /* |
| 147 | * On REV1 boards, need to change CLKDIV before enable DLL. |
| 148 | * Default CLKDIV is 8, change it to 4 temporarily. |
| 149 | */ |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 150 | uint pvr = get_pvr(); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 151 | uint temp_lbcdll = 0; |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 152 | |
| 153 | if (pvr == PVR_85xx_REV1) { |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 154 | /* FIXME: Justify the high bit here. */ |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 155 | lbc->lcrr = 0x10000004; |
wdenk | a445ddf | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 156 | } |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 157 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 158 | lbc->lcrr = CFG_LBC_LCRR & (~0x80000000); /* DLL Enabled */ |
| 159 | udelay(200); |
| 160 | |
| 161 | /* |
| 162 | * Sample LBC DLL ctrl reg, upshift it to set the |
| 163 | * override bits. |
| 164 | */ |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 165 | temp_lbcdll = gur->lbcdllcr; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 166 | gur->lbcdllcr = (((temp_lbcdll & 0xff) << 16) | 0x80000000); |
| 167 | asm("sync;isync;msync"); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 168 | } |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | |
| 172 | /* |
| 173 | * Initialize SDRAM memory on the Local Bus. |
| 174 | */ |
| 175 | |
| 176 | void |
| 177 | sdram_init(void) |
| 178 | { |
Kumar Gala | 0a7a097 | 2007-11-29 02:10:09 -0600 | [diff] [blame] | 179 | volatile ccsr_lbc_t *lbc = (void *)(CFG_MPC85xx_LBC_ADDR); |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 180 | uint *sdram_addr = (uint *)CFG_LBC_SDRAM_BASE; |
| 181 | |
| 182 | puts(" SDRAM: "); |
| 183 | print_size (CFG_LBC_SDRAM_SIZE * 1024 * 1024, "\n"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 184 | |
| 185 | /* |
| 186 | * Setup SDRAM Base and Option Registers |
| 187 | */ |
| 188 | lbc->or2 = CFG_OR2_PRELIM; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 189 | lbc->br2 = CFG_BR2_PRELIM; |
| 190 | lbc->lbcr = CFG_LBC_LBCR; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 191 | asm("msync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 192 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 193 | lbc->lsrt = CFG_LBC_LSRT; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 194 | lbc->mrtpr = CFG_LBC_MRTPR; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 195 | asm("sync"); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 196 | |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 197 | /* |
| 198 | * Configure the SDRAM controller. |
| 199 | */ |
| 200 | lbc->lsdmr = CFG_LBC_LSDMR_1; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 201 | asm("sync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 202 | *sdram_addr = 0xff; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 203 | ppcDcbf((unsigned long) sdram_addr); |
| 204 | udelay(100); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 205 | |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 206 | lbc->lsdmr = CFG_LBC_LSDMR_2; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 207 | asm("sync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 208 | *sdram_addr = 0xff; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 209 | ppcDcbf((unsigned long) sdram_addr); |
| 210 | udelay(100); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 211 | |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 212 | lbc->lsdmr = CFG_LBC_LSDMR_3; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 213 | asm("sync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 214 | *sdram_addr = 0xff; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 215 | ppcDcbf((unsigned long) sdram_addr); |
| 216 | udelay(100); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 217 | |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 218 | lbc->lsdmr = CFG_LBC_LSDMR_4; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 219 | asm("sync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 220 | *sdram_addr = 0xff; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 221 | ppcDcbf((unsigned long) sdram_addr); |
| 222 | udelay(100); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 223 | |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 224 | lbc->lsdmr = CFG_LBC_LSDMR_5; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 225 | asm("sync"); |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 226 | *sdram_addr = 0xff; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 227 | ppcDcbf((unsigned long) sdram_addr); |
| 228 | udelay(100); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 229 | } |
| 230 | |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 231 | #if !defined(CONFIG_SPD_EEPROM) |
| 232 | /************************************************************************* |
| 233 | * fixed sdram init -- doesn't use serial presence detect. |
| 234 | ************************************************************************/ |
| 235 | long int fixed_sdram (void) |
| 236 | { |
| 237 | #ifndef CFG_RAMBOOT |
Kumar Gala | 0a7a097 | 2007-11-29 02:10:09 -0600 | [diff] [blame] | 238 | volatile ccsr_ddr_t *ddr= (void *)(CFG_MPC85xx_DDR_ADDR); |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 239 | |
| 240 | ddr->cs0_bnds = CFG_DDR_CS0_BNDS; |
| 241 | ddr->cs0_config = CFG_DDR_CS0_CONFIG; |
| 242 | ddr->timing_cfg_1 = CFG_DDR_TIMING_1; |
| 243 | ddr->timing_cfg_2 = CFG_DDR_TIMING_2; |
| 244 | ddr->sdram_mode = CFG_DDR_MODE; |
| 245 | ddr->sdram_interval = CFG_DDR_INTERVAL; |
| 246 | #if defined (CONFIG_DDR_ECC) |
| 247 | ddr->err_disable = 0x0000000D; |
| 248 | ddr->err_sbe = 0x00ff0000; |
| 249 | #endif |
| 250 | asm("sync;isync;msync"); |
| 251 | udelay(500); |
| 252 | #if defined (CONFIG_DDR_ECC) |
| 253 | /* Enable ECC checking */ |
| 254 | ddr->sdram_cfg = (CFG_DDR_CONTROL | 0x20000000); |
| 255 | #else |
| 256 | ddr->sdram_cfg = CFG_DDR_CONTROL; |
| 257 | #endif |
| 258 | asm("sync; isync; msync"); |
| 259 | udelay(500); |
| 260 | #endif |
wdenk | 13eb221 | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 261 | return CFG_SDRAM_SIZE * 1024 * 1024; |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 262 | } |
| 263 | #endif /* !defined(CONFIG_SPD_EEPROM) */ |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 264 | |
| 265 | |
| 266 | #if defined(CONFIG_PCI) |
| 267 | /* |
| 268 | * Initialize PCI Devices, report devices found. |
| 269 | */ |
| 270 | |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 271 | |
Matthew McClintock | 8c0da86 | 2006-06-28 10:45:41 -0500 | [diff] [blame] | 272 | static struct pci_controller hose; |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 273 | |
| 274 | #endif /* CONFIG_PCI */ |
| 275 | |
| 276 | |
| 277 | void |
| 278 | pci_init_board(void) |
| 279 | { |
| 280 | #ifdef CONFIG_PCI |
wdenk | 492b9e7 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 281 | pci_mpc85xx_init(&hose); |
| 282 | #endif /* CONFIG_PCI */ |
| 283 | } |
Matthew McClintock | 148e26a | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 284 | |
| 285 | |
Kumar Gala | 6e57840 | 2007-11-28 22:54:27 -0600 | [diff] [blame] | 286 | #if defined(CONFIG_OF_BOARD_SETUP) |
Matthew McClintock | 148e26a | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 287 | void |
| 288 | ft_board_setup(void *blob, bd_t *bd) |
| 289 | { |
Kumar Gala | 6e57840 | 2007-11-28 22:54:27 -0600 | [diff] [blame] | 290 | int node, tmp[2]; |
| 291 | const char *path; |
Matthew McClintock | 148e26a | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 292 | |
| 293 | ft_cpu_setup(blob, bd); |
| 294 | |
Kumar Gala | 6e57840 | 2007-11-28 22:54:27 -0600 | [diff] [blame] | 295 | node = fdt_path_offset(blob, "/aliases"); |
| 296 | tmp[0] = 0; |
| 297 | if (node >= 0) { |
| 298 | #ifdef CONFIG_PCI |
| 299 | path = fdt_getprop(blob, node, "pci0", NULL); |
| 300 | if (path) { |
| 301 | tmp[1] = hose.last_busno - hose.first_busno; |
| 302 | do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1); |
| 303 | } |
| 304 | #endif |
Matthew McClintock | 148e26a | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 305 | } |
| 306 | } |
| 307 | #endif |