X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Famcc%2Facadia%2Facadia.c;h=2eb18df5e78766f5fe0102ce24296db72384d1e6;hb=e7d4a88e69459547a46906dbe021ccc83c614361;hp=0db619952eb4c3d39369d70765177a12d76b2da1;hpb=d1c3b27525b664e8c4db6bb173eed51bfc8220de;p=u-boot diff --git a/board/amcc/acadia/acadia.c b/board/amcc/acadia/acadia.c index 0db619952e..2eb18df5e7 100644 --- a/board/amcc/acadia/acadia.c +++ b/board/amcc/acadia/acadia.c @@ -2,23 +2,7 @@ * (C) Copyright 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 @@ -55,12 +39,10 @@ int board_early_init_f(void) { unsigned int reg; -#if !defined(CONFIG_NAND_U_BOOT) /* don't reinit PLL when booting via I2C bootstrap option */ mfsdr(SDR0_PINSTP, reg); if (reg != 0xf0000000) board_pll_init_f(); -#endif acadia_gpio_init(); @@ -78,12 +60,12 @@ int board_early_init_f(void) mfsdr(SDR0_ULTRA1, reg); mtsdr(SDR0_ULTRA1, reg | SDR_ULTRA1_LEDNENABLE); - mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */ - mtdcr(uicer, 0x00000000); /* disable all ints */ - mtdcr(uiccr, 0x00000010); - mtdcr(uicpr, 0xFE7FFFF0); /* set int polarities */ - mtdcr(uictr, 0x00000010); /* set int trigger levels */ - mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */ + mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ + mtdcr(UIC0ER, 0x00000000); /* disable all ints */ + mtdcr(UIC0CR, 0x00000010); + mtdcr(UIC0PR, 0xFE7FFFF0); /* set int polarities */ + mtdcr(UIC0TR, 0x00000010); /* set int trigger levels */ + mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ return 0; } @@ -102,15 +84,16 @@ int misc_init_f(void) */ int checkboard(void) { - char *s = getenv("serial#"); + char buf[64]; + int i = getenv_f("serial#", buf, sizeof(buf)); u8 rev; rev = in8(CONFIG_SYS_CPLD_BASE + 0); printf("Board: Acadia - AMCC PPC405EZ Evaluation Board, Rev. %X", rev); - if (s != NULL) { + if (i > 0) { puts(", serial# "); - puts(s); + puts(buf); } putc('\n');