powerpc: fsl: Update maintainers
[oweals/u-boot.git] / board / mpl / pati / cmd_pati.c
index 91683a38d175ea09f364317c22994233e155ba79..fcae5e0de6bde679c7b6094f0deab19939ab30d9 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2001
  * Denis Peter, MPL AG Switzerland, d.peter@mpl.ch
  *
- * 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+
  *
  * Adapted for PATI
  */
 #include "pci_eeprom.h"
 
 extern void show_pld_regs(void);
-extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
 extern void user_led0(int led_on);
 extern void user_led1(int led_on);
 
 /* ------------------------------------------------------------------------- */
-#if defined(CFG_PCI_CON_DEVICE)
+#if defined(CONFIG_SYS_PCI_CON_DEVICE)
 extern void pci_con_disc(void);
 extern void pci_con_connect(void);
 #endif
@@ -276,7 +260,7 @@ static int pati_pci_eeprom_write(unsigned short offset, unsigned long addr, unsi
 static int pati_pci_eeprom_read(unsigned short offset, unsigned long addr, unsigned short size)
 {
        int i;
-       unsigned short value;
+       unsigned short value = 0;
        unsigned short *buffer =(unsigned short *)addr;
        if((offset + size) > PATI_EEPROM_LAST_OFFSET) {
                size = PATI_EEPROM_LAST_OFFSET - offset;
@@ -355,7 +339,7 @@ static void display_pci_regs(void)
 }
 
 
-int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        if (strcmp(argv[1], "info") == 0)
        {
@@ -378,7 +362,7 @@ int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        user_led1(led_on);
                return 0;
        }
-#if defined(CFG_PCI_CON_DEVICE)
+#if defined(CONFIG_SYS_PCI_CON_DEVICE)
        if (strcmp(argv[1], "con") == 0) {
                pci_con_connect();
                return 0;
@@ -427,7 +411,7 @@ int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        pati,   8,      1,      do_pati,
-       "pati    - PATI specific Cmds\n",
+       "PATI specific Cmds",
        "info - displays board information\n"
        "pati pci  - displays PCI registers\n"
        "pati led <nr> <on> \n"
@@ -443,7 +427,7 @@ U_BOOT_CMD(
        "    era   - erase PCI EEPROM (write all word to 0xffff)\n"
        "    reload- Reload PCI Bridge with EEPROM Values\n"
        "    NOTE: <addr> must start on word boundary\n"
-       "          <offset> and <size> must be even byte values\n"
+       "          <offset> and <size> must be even byte values"
 );
 
 /* ------------------------------------------------------------------------- */