X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Fpdm360ng%2Fpdm360ng.c;h=371bcd9e6b4eae4b8aeb4a3a213d6f9b7c01e969;hb=4125bbcef6a998ce8580a1f5c53c8c93a56a125b;hp=3048acd117678635c952d27df86078917db99353;hpb=412665b46134f93464c09405e02f08ac9c62526d;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/pdm360ng/pdm360ng.c b/board/pdm360ng/pdm360ng.c index 3048acd..371bcd9 100644 --- a/board/pdm360ng/pdm360ng.c +++ b/board/pdm360ng/pdm360ng.c @@ -4,24 +4,7 @@ * (C) Copyright 2009-2010 * Michael Weiß, ifm ecomatic gmbh, michael.weiss@ifm.com * - * 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,7 +48,7 @@ sdram_conf_t mddrc_config[] = { }, }; -phys_size_t initdram (int board_type) +int dram_init(void) { int i; u32 msize = 0; @@ -112,7 +95,9 @@ phys_size_t initdram (int board_type) break; } - return msize; + gd->ram_size = msize; + + return 0; } static int set_lcd_brightness(char *); @@ -184,36 +169,6 @@ int misc_init_r(void) clrsetbits_be32(&im->gpio.gpdat, 0x01000000, 0x00040000); #endif -#if defined(CONFIG_HARD_I2C) - if (!getenv("ethaddr")) { - uchar buf[6]; - uchar ifm_oui[3] = { 0, 2, 1, }; - int ret; - - /* I2C-0 for on-board eeprom */ - i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS_NUM); - - /* Read ethaddr from EEPROM */ - ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, - CONFIG_SYS_I2C_EEPROM_MAC_OFFSET, 1, buf, 6); - if (ret != 0) { - printf("Error: Unable to read MAC from I2C" - " EEPROM at address %02X:%02X\n", - CONFIG_SYS_I2C_EEPROM_ADDR, - CONFIG_SYS_I2C_EEPROM_MAC_OFFSET); - return 1; - } - - /* Owned by IFM ? */ - if (memcmp(buf, ifm_oui, sizeof(ifm_oui))) { - printf("Illegal MAC address in EEPROM: %pM\n", buf); - return 1; - } - - eth_setenv_enetaddr("ethaddr", buf); - } -#endif /* defined(CONFIG_HARD_I2C) */ - return 0; } @@ -446,7 +401,7 @@ int checkboard (void) return 0; } -#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +#ifdef CONFIG_OF_BOARD_SETUP #ifdef CONFIG_FDT_FIXUP_PARTITIONS struct node_info nodes[] = { { "fsl,mpc5121-nfc", MTD_DEV_TYPE_NAND, }, @@ -494,7 +449,7 @@ static unsigned char edid_buf[128] = { }; #endif -void ft_board_setup(void *blob, bd_t *bd) +int ft_board_setup(void *blob, bd_t *bd) { u32 val[8]; int rc, i = 0; @@ -543,8 +498,10 @@ void ft_board_setup(void *blob, bd_t *bd) if (rc) printf("Unable to update flash reg property, err=%s\n", fdt_strerror(rc)); + + return 0; } -#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ +#endif /* CONFIG_OF_BOARD_SETUP */ /* * If argument is NULL, set the LCD brightness to the