X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=board%2Famcc%2Fwalnut%2Fwalnut.c;h=b21daa0af8e624e06a2f8334e024e9d4305305ad;hb=f1683aa73c31db0a025e0254e6ce1ee7e56aad3e;hp=641987e871ce0bbaca92a3461d0067190763b4a0;hpb=1730edf76c54381475e2da11f75b1ce563c4e62c;p=people%2Fms%2Fu-boot.git diff --git a/board/amcc/walnut/walnut.c b/board/amcc/walnut/walnut.c index 641987e871..b21daa0af8 100644 --- a/board/amcc/walnut/walnut.c +++ b/board/amcc/walnut/walnut.c @@ -2,29 +2,15 @@ * (C) Copyright 2000-2005 * Wolfgang Denk, DENX Software Engineering, wd@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 #include #include +DECLARE_GLOBAL_DATA_PTR; + int board_early_init_f(void) { /*-------------------------------------------------------------------------+ @@ -47,13 +33,13 @@ int board_early_init_f(void) | +-------------------------------------------------------------------------*/ - mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */ - mtdcr(uicer, 0x00000000); /* disable all ints */ - mtdcr(uiccr, 0x00000020); /* set all but FPGA SMI to be non-critical */ - mtdcr(uicpr, 0xFFFFFFE0); /* set int polarities */ - mtdcr(uictr, 0x10000000); /* set int trigger levels */ - mtdcr(uicvcr, 0x00000001); /* set vect base=0,INT0 highest priority */ - mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */ + mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ + mtdcr(UIC0ER, 0x00000000); /* disable all ints */ + mtdcr(UIC0CR, 0x00000020); /* set all but FPGA SMI to be non-critical */ + mtdcr(UIC0PR, 0xFFFFFFE0); /* set int polarities */ + mtdcr(UIC0TR, 0x10000000); /* set int trigger levels */ + mtdcr(UIC0VCR, 0x00000001); /* set vect base=0,INT0 highest priority */ + mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ /* set UART1 control to select CTS/RTS */ #define FPGA_BRDC 0xF0300004 @@ -67,7 +53,8 @@ int board_early_init_f(void) */ int checkboard(void) { - char *s = getenv("serial#"); + char buf[64]; + int i = getenv_f("serial#", buf, sizeof(buf)); uint pvr = get_pvr(); if (pvr == PVR_405GPR_RB) { @@ -76,9 +63,9 @@ int checkboard(void) puts("Board: Walnut - AMCC PPC405GP Evaluation Board"); } - if (s != NULL) { + if (i > 0) { puts(", serial# "); - puts(s); + puts(buf); } putc('\n'); @@ -86,10 +73,12 @@ int checkboard(void) } /* - * initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of + * dram_init() reads EEPROM via I2c. EEPROM contains all of * the necessary info for SDRAM controller configuration */ -long int initdram(int board_type) +int dram_init(void) { - return spd_sdram(); + gd->ram_size = spd_sdram(); + + return 0; }