mpc8260: remove sacsng board support
[platform/kernel/u-boot.git] / board / ppmc8260 / ppmc8260.c
index 2b20c26..f0f29b2 100644 (file)
@@ -7,23 +7,7 @@
  * Advent Networks, Inc. <http://www.adventnetworks.com>
  * Jay Monkman <jtm@smoothsmoothie.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -199,16 +183,16 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
-       volatile immap_t *immap = (immap_t *) CFG_IMMR;
+       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8260_t *memctl = &immap->im_memctl;
        volatile uchar c = 0xff;
-       volatile uchar *ramaddr0 = (uchar *) (CFG_SDRAM0_BASE);
-       volatile uchar *ramaddr1 = (uchar *) (CFG_SDRAM1_BASE);
-       ulong psdmr = CFG_PSDMR;
-       volatile uchar *ramaddr2 = (uchar *) (CFG_SDRAM2_BASE);
-       ulong lsdmr = CFG_LSDMR;
+       volatile uchar *ramaddr0 = (uchar *) (CONFIG_SYS_SDRAM0_BASE);
+       volatile uchar *ramaddr1 = (uchar *) (CONFIG_SYS_SDRAM1_BASE);
+       ulong psdmr = CONFIG_SYS_PSDMR;
+       volatile uchar *ramaddr2 = (uchar *) (CONFIG_SYS_SDRAM2_BASE);
+       ulong lsdmr = CONFIG_SYS_LSDMR;
        int i;
 
        /*
@@ -228,13 +212,13 @@ long int initdram (int board_type)
         *  accessing the SDRAM with a single-byte transaction."
         *
         * The appropriate BRx/ORx registers have already been set when we
-        * get here. The SDRAM can be accessed at the address CFG_SDRAM_BASE.
+        * get here. The SDRAM can be accessed at the address CONFIG_SYS_SDRAM_BASE.
         */
 
-       memctl->memc_psrt = CFG_PSRT;
-       memctl->memc_mptpr = CFG_MPTPR;
+       memctl->memc_psrt = CONFIG_SYS_PSRT;
+       memctl->memc_mptpr = CONFIG_SYS_MPTPR;
 
-#ifndef CFG_RAMBOOT
+#ifndef CONFIG_SYS_RAMBOOT
        memctl->memc_psdmr = psdmr | PSDMR_OP_PREA;
        *ramaddr0++ = c;
        *ramaddr1++ = c;
@@ -246,8 +230,8 @@ long int initdram (int board_type)
        }
 
        memctl->memc_psdmr = psdmr | PSDMR_OP_MRW;
-       ramaddr0 = (uchar *) (CFG_SDRAM0_BASE + 0x110);
-       ramaddr1 = (uchar *) (CFG_SDRAM1_BASE + 0x110);
+       ramaddr0 = (uchar *) (CONFIG_SYS_SDRAM0_BASE + 0x110);
+       ramaddr1 = (uchar *) (CONFIG_SYS_SDRAM1_BASE + 0x110);
        *ramaddr0 = c;
        *ramaddr1 = c;
 
@@ -271,21 +255,21 @@ long int initdram (int board_type)
 #endif
 
        /* return total ram size */
-       return ((CFG_SDRAM0_SIZE + CFG_SDRAM1_SIZE) * 1024 * 1024);
+       return ((CONFIG_SYS_SDRAM0_SIZE + CONFIG_SYS_SDRAM1_SIZE) * 1024 * 1024);
 }
 
 #ifdef CONFIG_MISC_INIT_R
 /* ------------------------------------------------------------------------- */
 int misc_init_r (void)
 {
-#ifdef CFG_LED_BASE
-       uchar ds = *(unsigned char *) (CFG_LED_BASE + 1);
+#ifdef CONFIG_SYS_LED_BASE
+       uchar ds = *(unsigned char *) (CONFIG_SYS_LED_BASE + 1);
        uchar ss;
        uchar tmp[64];
        int res;
 
        if ((ds != 0) && (ds != 0xff)) {
-               res = getenv_("ethaddr", (char *)tmp, sizeof (tmp));
+               res = getenv_f("ethaddr", (char *)tmp, sizeof (tmp));
                if (res > 0) {
                        ss = ((ds >> 4) & 0x0f);
                        ss += ss < 0x0a ? '0' : ('a' - 10);
@@ -298,10 +282,10 @@ int misc_init_r (void)
                        tmp[17] = '\0';
                        setenv ("ethaddr", (char *)tmp);
                        /* set the led to show the address */
-                       *((unsigned char *) (CFG_LED_BASE + 1)) = ds;
+                       *((unsigned char *) (CONFIG_SYS_LED_BASE + 1)) = ds;
                }
        }
-#endif /* CFG_LED_BASE */
+#endif /* CONFIG_SYS_LED_BASE */
        return (0);
 }
 #endif /* CONFIG_MISC_INIT_R */