X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=board%2Flogicpd%2Fimx27lite%2Fimx27lite.c;h=07b07a07f69529c7650b632e75c29b841303ad41;hb=326ea986ac150acdc7656d57fca647db80b50158;hp=442741547bcce3c5e8a787ce4e02d647dfa213dc;hpb=bbe310922f4d0b12c8aba97b45ed979db9c0ec9a;p=karo-tx-uboot.git diff --git a/board/logicpd/imx27lite/imx27lite.c b/board/logicpd/imx27lite/imx27lite.c index 442741547b..07b07a07f6 100644 --- a/board/logicpd/imx27lite/imx27lite.c +++ b/board/logicpd/imx27lite/imx27lite.c @@ -3,32 +3,18 @@ * Copyright (C) 2008,2009 Eric Jarrige * Copyright (C) 2009 Ilya Yanok * - * 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 +#include DECLARE_GLOBAL_DATA_PTR; -int board_init (void) +int board_init(void) { - struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE; #if defined(CONFIG_SYS_NAND_LARGEPAGE) struct system_control_regs *sc_regs = (struct system_control_regs *)IMX_SYSTEM_CTL_BASE; @@ -38,13 +24,12 @@ int board_init (void) gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; #ifdef CONFIG_MXC_UART - mx27_uart_init_pins(); + mx27_uart1_init_pins(); #endif #ifdef CONFIG_FEC_MXC mx27_fec_init_pins(); imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31)); - writel(readl(®s->port[PORTC].dr) | (1 << 31), - ®s->port[PORTC].dr); + gpio_set_value(GPIO_PORTC | 31, 1); #endif #ifdef CONFIG_MXC_MMC #if defined(CONFIG_MAGNESIUM) @@ -64,26 +49,29 @@ int board_init (void) return 0; } -int dram_init (void) +int dram_init(void) { + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); + return 0; +} -#if CONFIG_NR_DRAM_BANKS > 0 - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1, +void dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, PHYS_SDRAM_1_SIZE); -#endif #if CONFIG_NR_DRAM_BANKS > 1 gd->bd->bi_dram[1].start = PHYS_SDRAM_2; - gd->bd->bi_dram[1].size = get_ram_size((volatile void *)PHYS_SDRAM_2, + gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE); #endif - - return 0; } int checkboard(void) { - puts ("Board: "); + puts("Board: "); puts(CONFIG_BOARDNAME); return 0; }