wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 1 | /* |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 2 | * Copyright 2004 Freescale Semiconductor. |
wdenk | 42d1f03 | 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 | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 28 | #include <common.h> |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 29 | #include <pci.h> |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 30 | #include <asm/processor.h> |
| 31 | #include <asm/immap_85xx.h> |
| 32 | #include <spd.h> |
| 33 | |
Matthew McClintock | 40d5fa3 | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 34 | #if defined(CONFIG_OF_FLAT_TREE) |
| 35 | #include <ft_build.h> |
| 36 | extern void ft_cpu_setup(void *blob, bd_t *bd); |
| 37 | #endif |
| 38 | |
| 39 | |
Jon Loeliger | d9b94f2 | 2005-07-25 14:05:07 -0500 | [diff] [blame] | 40 | #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 41 | extern void ddr_enable_ecc(unsigned int dram_size); |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 42 | #endif |
| 43 | |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 44 | extern long int spd_sdram(void); |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 45 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 46 | void local_bus_init(void); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 47 | void sdram_init(void); |
| 48 | long int fixed_sdram(void); |
| 49 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 50 | |
wdenk | c837dcb | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 51 | int board_early_init_f (void) |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 52 | { |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 53 | return 0; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | int checkboard (void) |
| 57 | { |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 58 | puts("Board: ADS\n"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 59 | |
| 60 | #ifdef CONFIG_PCI |
| 61 | printf(" PCI1: 32 bit, %d MHz (compiled)\n", |
| 62 | CONFIG_SYS_CLK_FREQ / 1000000); |
| 63 | #else |
| 64 | printf(" PCI1: disabled\n"); |
| 65 | #endif |
| 66 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 67 | /* |
| 68 | * Initialize local bus. |
| 69 | */ |
| 70 | local_bus_init(); |
| 71 | |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 72 | return 0; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 73 | } |
| 74 | |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 75 | |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 76 | long int |
| 77 | initdram(int board_type) |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 78 | { |
| 79 | long dram_size = 0; |
| 80 | extern long spd_sdram (void); |
| 81 | volatile immap_t *immap = (immap_t *)CFG_IMMR; |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 82 | |
| 83 | puts("Initializing\n"); |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 84 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 85 | #if defined(CONFIG_DDR_DLL) |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 86 | { |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 87 | volatile ccsr_gur_t *gur= &immap->im_gur; |
| 88 | uint temp_ddrdll = 0; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 89 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 90 | /* |
| 91 | * Work around to stabilize DDR DLL |
| 92 | */ |
| 93 | temp_ddrdll = gur->ddrdllcr; |
| 94 | gur->ddrdllcr = ((temp_ddrdll & 0xff) << 16) | 0x80000000; |
| 95 | asm("sync;isync;msync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 96 | } |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 97 | #endif |
| 98 | |
| 99 | #if defined(CONFIG_SPD_EEPROM) |
| 100 | dram_size = spd_sdram (); |
| 101 | #else |
| 102 | dram_size = fixed_sdram (); |
| 103 | #endif |
| 104 | |
Jon Loeliger | d9b94f2 | 2005-07-25 14:05:07 -0500 | [diff] [blame] | 105 | #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 106 | /* |
| 107 | * Initialize and enable DDR ECC. |
| 108 | */ |
| 109 | ddr_enable_ecc(dram_size); |
| 110 | #endif |
| 111 | |
| 112 | /* |
| 113 | * Initialize SDRAM. |
| 114 | */ |
| 115 | sdram_init(); |
| 116 | |
| 117 | puts(" DDR: "); |
| 118 | return dram_size; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | /* |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 123 | * Initialize Local Bus |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 124 | */ |
| 125 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 126 | void |
| 127 | local_bus_init(void) |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 128 | { |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 129 | volatile immap_t *immap = (immap_t *)CFG_IMMR; |
| 130 | volatile ccsr_gur_t *gur = &immap->im_gur; |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 131 | volatile ccsr_lbc_t *lbc = &immap->im_lbc; |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 132 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 133 | uint clkdiv; |
| 134 | uint lbc_hz; |
| 135 | sys_info_t sysinfo; |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 136 | |
| 137 | /* |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 138 | * Errata LBC11. |
| 139 | * Fix Local Bus clock glitch when DLL is enabled. |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 140 | * |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 141 | * If localbus freq is < 66Mhz, DLL bypass mode must be used. |
| 142 | * If localbus freq is > 133Mhz, DLL can be safely enabled. |
| 143 | * Between 66 and 133, the DLL is enabled with an override workaround. |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 144 | */ |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 145 | |
| 146 | get_sys_info(&sysinfo); |
| 147 | clkdiv = lbc->lcrr & 0x0f; |
| 148 | lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv; |
| 149 | |
| 150 | if (lbc_hz < 66) { |
| 151 | lbc->lcrr = CFG_LBC_LCRR | 0x80000000; /* DLL Bypass */ |
| 152 | |
| 153 | } else if (lbc_hz >= 133) { |
| 154 | lbc->lcrr = CFG_LBC_LCRR & (~0x80000000); /* DLL Enabled */ |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 155 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 156 | } else { |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 157 | /* |
| 158 | * On REV1 boards, need to change CLKDIV before enable DLL. |
| 159 | * Default CLKDIV is 8, change it to 4 temporarily. |
| 160 | */ |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 161 | uint pvr = get_pvr(); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 162 | uint temp_lbcdll = 0; |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 163 | |
| 164 | if (pvr == PVR_85xx_REV1) { |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 165 | /* FIXME: Justify the high bit here. */ |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 166 | lbc->lcrr = 0x10000004; |
wdenk | 97d80fc | 2004-06-09 00:34:46 +0000 | [diff] [blame] | 167 | } |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 168 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 169 | lbc->lcrr = CFG_LBC_LCRR & (~0x80000000); /* DLL Enabled */ |
| 170 | udelay(200); |
| 171 | |
| 172 | /* |
| 173 | * Sample LBC DLL ctrl reg, upshift it to set the |
| 174 | * override bits. |
| 175 | */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 176 | temp_lbcdll = gur->lbcdllcr; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 177 | gur->lbcdllcr = (((temp_lbcdll & 0xff) << 16) | 0x80000000); |
| 178 | asm("sync;isync;msync"); |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 179 | } |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | |
| 183 | /* |
| 184 | * Initialize SDRAM memory on the Local Bus. |
| 185 | */ |
| 186 | |
| 187 | void |
| 188 | sdram_init(void) |
| 189 | { |
| 190 | volatile immap_t *immap = (immap_t *)CFG_IMMR; |
| 191 | volatile ccsr_lbc_t *lbc= &immap->im_lbc; |
| 192 | uint *sdram_addr = (uint *)CFG_LBC_SDRAM_BASE; |
| 193 | |
| 194 | puts(" SDRAM: "); |
| 195 | print_size (CFG_LBC_SDRAM_SIZE * 1024 * 1024, "\n"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 196 | |
| 197 | /* |
| 198 | * Setup SDRAM Base and Option Registers |
| 199 | */ |
| 200 | lbc->or2 = CFG_OR2_PRELIM; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 201 | lbc->br2 = CFG_BR2_PRELIM; |
| 202 | lbc->lbcr = CFG_LBC_LBCR; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 203 | asm("msync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 204 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 205 | lbc->lsrt = CFG_LBC_LSRT; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 206 | lbc->mrtpr = CFG_LBC_MRTPR; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 207 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 208 | |
| 209 | /* |
| 210 | * Configure the SDRAM controller. |
| 211 | */ |
| 212 | lbc->lsdmr = CFG_LBC_LSDMR_1; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 213 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 214 | *sdram_addr = 0xff; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 215 | ppcDcbf((unsigned long) sdram_addr); |
| 216 | udelay(100); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 217 | |
| 218 | lbc->lsdmr = CFG_LBC_LSDMR_2; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 219 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 220 | *sdram_addr = 0xff; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 221 | ppcDcbf((unsigned long) sdram_addr); |
| 222 | udelay(100); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 223 | |
| 224 | lbc->lsdmr = CFG_LBC_LSDMR_3; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 225 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 226 | *sdram_addr = 0xff; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 227 | ppcDcbf((unsigned long) sdram_addr); |
| 228 | udelay(100); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 229 | |
| 230 | lbc->lsdmr = CFG_LBC_LSDMR_4; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 231 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 232 | *sdram_addr = 0xff; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 233 | ppcDcbf((unsigned long) sdram_addr); |
| 234 | udelay(100); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 235 | |
| 236 | lbc->lsdmr = CFG_LBC_LSDMR_5; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 237 | asm("sync"); |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 238 | *sdram_addr = 0xff; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 239 | ppcDcbf((unsigned long) sdram_addr); |
| 240 | udelay(100); |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | |
| 244 | #if defined(CFG_DRAM_TEST) |
| 245 | int testdram (void) |
| 246 | { |
| 247 | uint *pstart = (uint *) CFG_MEMTEST_START; |
| 248 | uint *pend = (uint *) CFG_MEMTEST_END; |
| 249 | uint *p; |
| 250 | |
| 251 | printf("SDRAM test phase 1:\n"); |
| 252 | for (p = pstart; p < pend; p++) |
| 253 | *p = 0xaaaaaaaa; |
| 254 | |
| 255 | for (p = pstart; p < pend; p++) { |
| 256 | if (*p != 0xaaaaaaaa) { |
| 257 | printf ("SDRAM test fails at: %08x\n", (uint) p); |
| 258 | return 1; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | printf("SDRAM test phase 2:\n"); |
| 263 | for (p = pstart; p < pend; p++) |
| 264 | *p = 0x55555555; |
| 265 | |
| 266 | for (p = pstart; p < pend; p++) { |
| 267 | if (*p != 0x55555555) { |
| 268 | printf ("SDRAM test fails at: %08x\n", (uint) p); |
| 269 | return 1; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | printf("SDRAM test passed.\n"); |
| 274 | return 0; |
| 275 | } |
| 276 | #endif |
| 277 | |
| 278 | |
| 279 | #if !defined(CONFIG_SPD_EEPROM) |
| 280 | /************************************************************************* |
| 281 | * fixed sdram init -- doesn't use serial presence detect. |
| 282 | ************************************************************************/ |
| 283 | long int fixed_sdram (void) |
| 284 | { |
| 285 | #ifndef CFG_RAMBOOT |
| 286 | volatile immap_t *immap = (immap_t *)CFG_IMMR; |
| 287 | volatile ccsr_ddr_t *ddr= &immap->im_ddr; |
| 288 | |
| 289 | ddr->cs0_bnds = CFG_DDR_CS0_BNDS; |
| 290 | ddr->cs0_config = CFG_DDR_CS0_CONFIG; |
| 291 | ddr->timing_cfg_1 = CFG_DDR_TIMING_1; |
| 292 | ddr->timing_cfg_2 = CFG_DDR_TIMING_2; |
| 293 | ddr->sdram_mode = CFG_DDR_MODE; |
| 294 | ddr->sdram_interval = CFG_DDR_INTERVAL; |
| 295 | #if defined (CONFIG_DDR_ECC) |
| 296 | ddr->err_disable = 0x0000000D; |
| 297 | ddr->err_sbe = 0x00ff0000; |
| 298 | #endif |
| 299 | asm("sync;isync;msync"); |
| 300 | udelay(500); |
| 301 | #if defined (CONFIG_DDR_ECC) |
| 302 | /* Enable ECC checking */ |
| 303 | ddr->sdram_cfg = (CFG_DDR_CONTROL | 0x20000000); |
| 304 | #else |
| 305 | ddr->sdram_cfg = CFG_DDR_CONTROL; |
| 306 | #endif |
| 307 | asm("sync; isync; msync"); |
| 308 | udelay(500); |
| 309 | #endif |
wdenk | 0ac6f8b | 2004-07-09 23:27:13 +0000 | [diff] [blame] | 310 | return CFG_SDRAM_SIZE * 1024 * 1024; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 311 | } |
| 312 | #endif /* !defined(CONFIG_SPD_EEPROM) */ |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 313 | |
| 314 | |
| 315 | #if defined(CONFIG_PCI) |
| 316 | /* |
| 317 | * Initialize PCI Devices, report devices found. |
| 318 | */ |
| 319 | |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 320 | |
Matthew McClintock | 52c7a68 | 2006-06-28 10:45:41 -0500 | [diff] [blame] | 321 | static struct pci_controller hose; |
wdenk | 9aea953 | 2004-08-01 23:02:45 +0000 | [diff] [blame] | 322 | |
| 323 | #endif /* CONFIG_PCI */ |
| 324 | |
| 325 | |
| 326 | void |
| 327 | pci_init_board(void) |
| 328 | { |
| 329 | #ifdef CONFIG_PCI |
| 330 | extern void pci_mpc85xx_init(struct pci_controller *hose); |
| 331 | |
| 332 | pci_mpc85xx_init(&hose); |
| 333 | #endif /* CONFIG_PCI */ |
| 334 | } |
Matthew McClintock | 40d5fa3 | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 335 | |
| 336 | |
| 337 | #if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) |
| 338 | void |
| 339 | ft_board_setup(void *blob, bd_t *bd) |
| 340 | { |
| 341 | u32 *p; |
| 342 | int len; |
| 343 | |
Matthew McClintock | 52c7a68 | 2006-06-28 10:45:41 -0500 | [diff] [blame] | 344 | #ifdef CONFIG_PCI |
| 345 | ft_pci_setup(blob, bd); |
| 346 | #endif |
Matthew McClintock | 40d5fa3 | 2006-06-28 10:43:36 -0500 | [diff] [blame] | 347 | ft_cpu_setup(blob, bd); |
| 348 | |
| 349 | p = ft_get_prop(blob, "/memory/reg", &len); |
| 350 | if (p != NULL) { |
| 351 | *p++ = cpu_to_be32(bd->bi_memstart); |
| 352 | *p = cpu_to_be32(bd->bi_memsize); |
| 353 | } |
| 354 | } |
| 355 | #endif |