X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fadder%2Fadder.c;h=2ee7096b83677a3337c6f8e52fecc9791ef20fb2;hb=28c860b23fb2dd1affec909e98f25c58324e2140;hp=817c8649aa630cdc5e9ca1d985a93415682c1334;hpb=27f33e9f45ef7f9685cbdc65066a1828e85dde4f;p=oweals%2Fu-boot.git diff --git a/board/adder/adder.c b/board/adder/adder.c index 817c8649aa..2ee7096b83 100644 --- a/board/adder/adder.c +++ b/board/adder/adder.c @@ -5,23 +5,7 @@ * Support for Analogue&Micro Adder boards family. * Tested on AdderII and Adder87x. * - * 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 @@ -65,10 +49,10 @@ static uint sdram_table[] = { 0xfffffc27, 0xfffffc04, 0xfffffc04, 0xfffffc04 }; -long int initdram (int board_type) +phys_size_t initdram (int board_type) { long int msize; - volatile immap_t *immap = (volatile immap_t *)CFG_IMMR; + volatile immap_t *immap = (volatile immap_t *)CONFIG_SYS_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; upmconfig(UPMA, sdram_table, sizeof(sdram_table) / sizeof(uint)); @@ -76,7 +60,7 @@ long int initdram (int board_type) /* Configure SDRAM refresh */ memctl->memc_mptpr = MPTPR_PTP_DIV32; /* BRGCLK/32 */ - memctl->memc_mamr = (94 << 24) | CFG_MAMR; /* No refresh */ + memctl->memc_mamr = (94 << 24) | CONFIG_SYS_MAMR; /* No refresh */ udelay(200); /* Run precharge from location 0x15 */ @@ -94,10 +78,10 @@ long int initdram (int board_type) udelay(200); memctl->memc_mamr |= MAMR_PTAE; /* Enable refresh */ - memctl->memc_or1 = ~(CFG_SDRAM_MAX_SIZE - 1) | OR_CSNT_SAM; - memctl->memc_br1 = CFG_SDRAM_BASE | BR_PS_32 | BR_MS_UPMA | BR_V; + memctl->memc_or1 = ~(CONFIG_SYS_SDRAM_MAX_SIZE - 1) | OR_CSNT_SAM; + memctl->memc_br1 = CONFIG_SYS_SDRAM_BASE | BR_PS_32 | BR_MS_UPMA | BR_V; - msize = get_ram_size(CFG_SDRAM_BASE, CFG_SDRAM_MAX_SIZE); + msize = get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_SDRAM_MAX_SIZE); memctl->memc_or1 |= ~(msize - 1); return msize;