summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-11-15 22:48:02 +0100
committerWolfgang Denk <wd@denx.de>2009-11-15 22:48:02 +0100
commit7b18e8c90cbf5f8e42769bbb711314fcf28c7768 (patch)
tree9ea5921cb74cfd06d86c4f3d2ab5c68ba0311e70
parentb55edd97cef537f0adb56077cec0a21805ea7b44 (diff)
parentcdbdbe65f5f006cba208accee5a126c659d4b867 (diff)
downloadbootable_bootloader_goldelico_gta04-7b18e8c90cbf5f8e42769bbb711314fcf28c7768.zip
bootable_bootloader_goldelico_gta04-7b18e8c90cbf5f8e42769bbb711314fcf28c7768.tar.gz
bootable_bootloader_goldelico_gta04-7b18e8c90cbf5f8e42769bbb711314fcf28c7768.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
-rw-r--r--cpu/mpc85xx/tlb.c4
-rw-r--r--cpu/mpc8xxx/ddr/options.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/cpu/mpc85xx/tlb.c b/cpu/mpc85xx/tlb.c
index 6e94c23..ea5deb2 100644
--- a/cpu/mpc85xx/tlb.c
+++ b/cpu/mpc85xx/tlb.c
@@ -132,10 +132,10 @@ int find_tlb_idx(void *addr, u8 tlbsel)
void init_addr_map(void)
{
int i;
- unsigned int max_cam = (mfspr(SPRN_TLB1CFG) >> 16) & 0xff;
+ unsigned int num_cam = mfspr(SPRN_TLB1CFG) & 0xfff;
/* walk all the entries */
- for (i = 0; i < max_cam; i++) {
+ for (i = 0; i < num_cam; i++) {
unsigned long epn;
u32 tsize, _mas1;
phys_addr_t rpn;
diff --git a/cpu/mpc8xxx/ddr/options.c b/cpu/mpc8xxx/ddr/options.c
index db44291..2e030c1 100644
--- a/cpu/mpc8xxx/ddr/options.c
+++ b/cpu/mpc8xxx/ddr/options.c
@@ -22,9 +22,7 @@ unsigned int populate_memctl_options(int all_DIMMs_registered,
unsigned int ctrl_num)
{
unsigned int i;
-#if (CONFIG_NUM_DDR_CONTROLLERS > 1)
const char *p;
-#endif
/* Chip select options. */
@@ -242,8 +240,10 @@ unsigned int populate_memctl_options(int all_DIMMs_registered,
simple_strtoul(p, NULL, 0);
}
}
+#endif
- if( (p = getenv("ba_intlv_ctl")) != NULL) {
+ if( ((p = getenv("ba_intlv_ctl")) != NULL) &&
+ (CONFIG_CHIP_SELECTS_PER_CTRL > 1)) {
if (strcmp(p, "cs0_cs1") == 0)
popts->ba_intlv_ctl = FSL_DDR_CS0_CS1;
else if (strcmp(p, "cs2_cs3") == 0)
@@ -283,7 +283,6 @@ unsigned int populate_memctl_options(int all_DIMMs_registered,
break;
}
}
-#endif
fsl_ddr_board_options(popts, pdimm, ctrl_num);