]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
TQM85xx: Fix a couple warnings in TQM8548 build
authorAndy Fleming <afleming@freescale.com>
Mon, 16 Feb 2009 15:40:20 +0000 (09:40 -0600)
committerAndy Fleming <afleming@freescale.com>
Tue, 17 Feb 2009 00:06:03 +0000 (18:06 -0600)
The ecm variable in sdram.c was being declared for all 8548, but only
used by specific 8548 boards, so we make that variable require those
specific boards, too

The nand code was using an index "i" into a table, and then re-using "i"
to set addresses for each upm.  However, then it relied on the old value
of i still being there to enable things.  Changed the second "i" to "j"

Signed-off-by: Andy Fleming <afleming@freescale.com>
board/tqc/tqm85xx/nand.c
board/tqc/tqm85xx/sdram.c

index dea652dfd9fab0d4acff5661720b61d9fc182cb1..8133fdc40eef8f902fec646c697d4846438ffb90 100644 (file)
@@ -395,7 +395,7 @@ static void upmb_write (u_char addr, ulong val)
  */
 static void nand_upm_setup (volatile ccsr_lbc_t *lbc)
 {
-       uint i;
+       uint i, j;
        uint or3 = CONFIG_SYS_OR3_PRELIM;
        uint clock = get_lbc_clock ();
 
@@ -429,8 +429,8 @@ static void nand_upm_setup (volatile ccsr_lbc_t *lbc)
        /* Assign address of table */
        nand_upm_patt = upm_freq_table[i].upm_patt;
 
-       for (i = 0; i < 64; i++) {
-               upmb_write (i, *nand_upm_patt);
+       for (j = 0; j < 64; j++) {
+               upmb_write (j, *nand_upm_patt);
                nand_upm_patt++;
        }
 
index 2b3de4499b16cf86e689c71e0e74bc7b25286b2c..6d73a88ab0f7aaf4903c15cfd9f87e177a782362 100644 (file)
@@ -79,7 +79,9 @@ long int sdram_setup (int casl)
        volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_MPC85xx_DDR_ADDR);
 #ifdef CONFIG_TQM8548
        volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+#if defined(CONFIG_TQM8548_AG) || defined(CONFIG_TQM8548_BE)
        volatile ccsr_local_ecm_t *ecm = (void *)(CONFIG_SYS_MPC85xx_ECM_ADDR);
+#endif
 #else /* !CONFIG_TQM8548 */
        unsigned long cfg_ddr_timing1;
        unsigned long cfg_ddr_mode;