]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/gen860t/gen860t.c
Merge branch 'u-boot/master' into u-boot-arm/master
[karo-tx-uboot.git] / board / gen860t / gen860t.c
index eb732210053ada257bf28b0cc97e75b0f2f80769..fe139f4920d196d543d4aa5a2885230880cf8b5c 100644 (file)
@@ -3,23 +3,7 @@
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  * Keith Outwater, keith_outwater@mvis.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 <virtex2.h>
@@ -36,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <status_led.h>
 #endif
 
-#if defined(CFG_CMD_MII) && defined(CONFIG_MII)
+#if defined(CONFIG_CMD_MII) && defined(CONFIG_MII)
 #include <net.h>
 #endif
 
@@ -132,7 +116,7 @@ int checkboard (void)
        char buf[64];
        int i;
 
-       i = getenv_("board_id", buf, sizeof (buf));
+       i = getenv_f("board_id", buf, sizeof (buf));
        s = (i > 0) ? buf : NULL;
 
        if (s) {
@@ -141,7 +125,7 @@ int checkboard (void)
                printf ("<unknown> ");
        }
 
-       i = getenv_("serial#", buf, sizeof (buf));
+       i = getenv_f("serial#", buf, sizeof (buf));
        s = (i > 0) ? buf : NULL;
 
        if (s) {
@@ -158,9 +142,9 @@ int checkboard (void)
 /*
  * Initialize SDRAM
  */
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
-       volatile immap_t *immr = (immap_t *) CFG_IMMR;
+       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immr->im_memctl;
 
        upmconfig (UPMA,
@@ -171,14 +155,14 @@ long int initdram (int board_type)
        /*
         * Setup MAMR register
         */
-       memctl->memc_mptpr = CFG_MPTPR_1BK_8K;
-       memctl->memc_mamr = CFG_MAMR_8COL & (~(MAMR_PTAE));     /* no refresh yet */
+       memctl->memc_mptpr = CONFIG_SYS_MPTPR_1BK_8K;
+       memctl->memc_mamr = CONFIG_SYS_MAMR_8COL & (~(MAMR_PTAE));      /* no refresh yet */
 
        /*
         * Map CS1* to SDRAM bank
         */
-       memctl->memc_or1 = CFG_OR1;
-       memctl->memc_br1 = CFG_BR1;
+       memctl->memc_or1 = CONFIG_SYS_OR1;
+       memctl->memc_br1 = CONFIG_SYS_BR1;
 
        /*
         * Perform SDRAM initialization sequence:
@@ -222,9 +206,7 @@ long int initdram (int board_type)
  * Disk On Chip (DOC) Millenium initialization.
  * The DOC lives in the CS2* space
  */
-#if (CONFIG_COMMANDS & CFG_CMD_DOC)
-extern void doc_probe (ulong physadr);
-
+#if defined(CONFIG_CMD_DOC)
 void doc_init (void)
 {
        printf ("Probing at 0x%.8x: ", DOC_BASE);
@@ -237,7 +219,7 @@ void doc_init (void)
  */
 int misc_init_r (void)
 {
-       volatile immap_t *immr = (immap_t *) CFG_IMMR;
+       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immr->im_memctl;
 
        /*
@@ -250,11 +232,11 @@ int misc_init_r (void)
 
        config_mpc8xx_ioports (immr);
 
-#if (CONFIG_COMMANDS & CFG_CMD_MII)
+#if defined(CONFIG_CMD_MII)
        mii_init ();
 #endif
 
-#if (CONFIG_FPGA)
+#if defined(CONFIG_FPGA)
        gen860t_init_fpga ();
 #endif
        return 0;
@@ -278,7 +260,7 @@ int last_stage_init (void)
        /*
         * Read the environment to see what to do with the beeper
         */
-       i = getenv_("beeper", buf, sizeof (buf));
+       i = getenv_f("beeper", buf, sizeof (buf));
        if (i > 0) {
                do_beeper (buf);
        }
@@ -294,14 +276,3 @@ void board_poweroff (void)
        puts ("### Please power off the board ###\n");
        while (1);
 }
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed (void)
-{
-       return 0;               /* No hotkeys supported */
-}
-#endif