]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/amcc/ebony/ebony.c
Merge git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / board / amcc / ebony / ebony.c
index e61b5de2d84b5261807eb2d58fea98302484226b..df35589aa6242fac7b92699e72370264034e9758 100644 (file)
@@ -1,23 +1,7 @@
 /*
  *  Copyright (C) 2002 Scott McNutt <smcnutt@artesyncp.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>
@@ -92,12 +76,13 @@ int board_early_init_f(void)
 
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: Ebony - AMCC PPC440GP Evaluation Board");
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');
 
@@ -164,96 +149,3 @@ long int fixed_sdram(void)
        return (128 * 1024 * 1024);     /* 128 MB                           */
 }
 #endif                         /* !defined(CONFIG_SPD_EEPROM) */
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        * The ebony board is always configured as the host & requires the
-        * PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       strap = mfdcr(CPC0_STRP1);
-       if ((strap & 0x00100000) == 0) {
-               printf("PCI: CPC0_STRP1[PAE] not set.\n");
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  pci_target_init
- *
- *     The bootstrap configuration provides default settings for the pci
- *     inbound map (PIM). But the bootstrap config choices are limited and
- *     may not be sufficient for a given board.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT)
-void pci_target_init(struct pci_controller *hose)
-{
-       /*--------------------------------------------------------------------------+
-        * Disable everything
-        *--------------------------------------------------------------------------*/
-       out32r(PCIX0_PIM0SA, 0);        /* disable */
-       out32r(PCIX0_PIM1SA, 0);        /* disable */
-       out32r(PCIX0_PIM2SA, 0);        /* disable */
-       out32r(PCIX0_EROMBA, 0);        /* disable expansion rom */
-
-       /*--------------------------------------------------------------------------+
-        * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping
-     * options to not support sizes such as 128/256 MB.
-        *--------------------------------------------------------------------------*/
-       out32r(PCIX0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out32r(PCIX0_PIM0LAH, 0);
-       out32r(PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
-
-       out32r(PCIX0_BAR0, 0);
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r(PCIX0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out16r(PCIX0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out16r(PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  is_pci_host
- *
- *     This routine is called to determine if a pci scan should be
- *     performed. With various hardware environments (especially cPCI and
- *     PPMC) it's insufficient to depend on the state of the arbiter enable
- *     bit in the strap register, or generic host/adapter assumptions.
- *
- *     Rather than hard-code a bad assumption in the general 440 code, the
- *     440 pci code requires the board to decide at runtime.
- *
- *     Return 0 for adapter mode, non-zero for host (monarch) mode.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* The ebony board is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */