]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/amcc/yosemite/yosemite.c
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / board / amcc / yosemite / yosemite.c
index b6f8b7028e7e835411d770bb34bdb87c083f024a..f46aacfff89925db8c10e98321aa96ecfef5283a 100644 (file)
@@ -2,27 +2,11 @@
  * (C) Copyright 2006-2007
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
- * 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>
-#include <ppc4xx.h>
+#include <asm/ppc4xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -188,7 +172,8 @@ int misc_init_r (void)
 
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
        u8 rev;
        u32 clock = get_async_pci_freq();
 
@@ -201,9 +186,9 @@ int checkboard(void)
        rev = in_8((void *)(CONFIG_SYS_BCSR_BASE + 0));
        printf(", Rev. %X, PCI-Async=%d MHz", rev, clock / 1000000);
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');
 
@@ -220,7 +205,7 @@ int checkboard(void)
 }
 
 /*************************************************************************
- *  initdram -- doesn't use serial presence detect.
+ *  dram_init -- doesn't use serial presence detect.
  *
  *  Assumes:    256 MB, ECC, non-registered
  *              PLB @ 133 MHz
@@ -301,7 +286,7 @@ void sdram_tr1_set(int ram_address, int* tr1_value)
        *tr1_value = (first_good + last_bad) / 2;
 }
 
-phys_size_t initdram(int board)
+int dram_init(void)
 {
        register uint reg;
        int tr1_bank1, tr1_bank2;
@@ -349,29 +334,11 @@ phys_size_t initdram(int board)
        sdram_tr1_set(0x08000000, &tr1_bank2);
        mtsdram(SDRAM0_TR1, (((tr1_bank1+tr1_bank2)/2) | 0x80800800));
 
-       return CONFIG_SYS_SDRAM_BANKS * (CONFIG_SYS_KBYTES_SDRAM * 1024);       /* return bytes */
-}
+       gd->ram_size = CONFIG_SYS_SDRAM_BANKS *
+               (CONFIG_SYS_KBYTES_SDRAM * 1024);       /* set bytes */
 
-/*************************************************************************
- *  pci_master_init
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*--------------------------------------------------------------------------+
-         | Write the PowerPC440 EP PCI Configuration regs.
-         |   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-         |   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-         +--------------------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
+       return 0;
 }
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
 
 /*************************************************************************
  *  hw_watchdog_reset