]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_tsi148.c
tpm: Drop two unused options
[karo-tx-uboot.git] / common / cmd_tsi148.c
index 6dc9dab36899c10035af72ea4059043bfa0f376a..ea96d0ffb0a56d9bcd352fb325e87cdfd8593f73 100644 (file)
@@ -5,23 +5,7 @@
  *
  * (C) Copyright 2003 Stefan Roese, stefan.roese@esd-electronics.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>
@@ -32,8 +16,8 @@
 
 #include <tsi148.h>
 
-#define PCI_VENDOR PCI_VENDOR_ID_TUNDRA
-#define PCI_DEVICE PCI_DEVICE_ID_TUNDRA_TSI148
+#define LPCI_VENDOR PCI_VENDOR_ID_TUNDRA
+#define LPCI_DEVICE PCI_DEVICE_ID_TUNDRA_TSI148
 
 typedef struct _TSI148_DEV TSI148_DEV;
 
@@ -53,11 +37,11 @@ static TSI148_DEV *dev;
 
 int tsi148_init(void)
 {
-       int j, result, lastError = 0;
+       int j, result;
        pci_dev_t busdevfn;
        unsigned int val;
 
-       busdevfn = pci_find_device(PCI_VENDOR, PCI_DEVICE, 0);
+       busdevfn = pci_find_device(LPCI_VENDOR, LPCI_DEVICE, 0);
        if (busdevfn == -1) {
                puts("Tsi148: No Tundra Tsi148 found!\n");
                return -1;
@@ -69,8 +53,7 @@ int tsi148_init(void)
        dev = malloc(sizeof(*dev));
        if (NULL == dev) {
                puts("Tsi148: No memory!\n");
-               result = -1;
-               goto break_20;
+               return -1;
        }
 
        memset(dev, 0, sizeof(*dev));
@@ -85,7 +68,7 @@ int tsi148_init(void)
        /* check mapping */
        debug("Tsi148: Read via mapping, PCI_ID = %08X\n",
              readl(&dev->uregs->pci_id));
-       if (((PCI_DEVICE << 16) | PCI_VENDOR) != readl(&dev->uregs->pci_id)) {
+       if (((LPCI_DEVICE << 16) | LPCI_VENDOR) != readl(&dev->uregs->pci_id)) {
                printf("Tsi148: Cannot read PCI-ID via Mapping: %08x\n",
                       readl(&dev->uregs->pci_id));
                result = -1;
@@ -139,8 +122,6 @@ int tsi148_init(void)
  break_30:
        free(dev);
        dev = NULL;
- break_20:
-       lastError = result;
 
        return result;
 }