]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/gw8260/gw8260.c
kbuild: delete *.pyc files by "make distclean"
[karo-tx-uboot.git] / board / gw8260 / gw8260.c
index 28f5ca99e87db3d847f404592d11621b090d651f..bbae0a89223e9b1835f574443cf520d8833d80d6 100644 (file)
  * Advent Networks, Inc. <http://www.adventnetworks.com>
  * Oliver Brown <oliverb@alumni.utexas.net>
  *
- * 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+
  */
 
 /*********************************************************************/
@@ -214,13 +198,13 @@ const iop_conf_t iop_conf_tab[4][32] = {
 /*********************************************************************/
 int checkboard (void)
 {
-       char *str;
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts ("Board: Advent Networks gw8260\n");
 
-       str = getenv ("serial#");
-       if (str != NULL) {
-               printf ("SN:    %s\n", str);
+       if (i > 0) {
+               printf("SN:    %s\n", buf);
        }
        return 0;
 }
@@ -544,15 +528,11 @@ int mem_test_walk (void)
 /*********************************************************************/
 int testdram (void)
 {
-       char *s;
        int rundata, runaddress, runwalk;
 
-       s = getenv ("testdramdata");
-       rundata = (s && (*s == 'y')) ? 1 : 0;
-       s = getenv ("testdramaddress");
-       runaddress = (s && (*s == 'y')) ? 1 : 0;
-       s = getenv ("testdramwalk");
-       runwalk = (s && (*s == 'y')) ? 1 : 0;
+       rundata = getenv_yesno("testdramdata") == 1;
+       runaddress = getenv_yesno("testdramaddress") == 1;
+       runwalk = getenv_yesno("testdramwalk") == 1;
 
        if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
                printf ("Testing RAM ... ");