X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fmuas3001%2Fmuas3001.c;h=08eb5e829039d86f5395fdfdb140a23bf262327e;hb=c292adae170fa8c27dca75963bdb0a9afc640e57;hp=8f83dd9af8eb419cba80ee923da74f5fc05ee12c;hpb=b6b4625d175019e387e5b0f65a17322a78f6bb90;p=u-boot diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c index 8f83dd9af8..08eb5e8290 100644 --- a/board/muas3001/muas3001.c +++ b/board/muas3001/muas3001.c @@ -2,23 +2,7 @@ * (C) Copyright 2008 * Heiko Schocher, DENX Software Engineering, hs@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 @@ -302,32 +286,17 @@ int board_early_init_r (void) } #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) +DECLARE_GLOBAL_DATA_PTR; + /* * update "memory" property in the blob */ void ft_blob_update (void *blob, bd_t *bd) { int ret, nodeoffset = 0; - ulong memory_data[2] = {0}; ulong flash_data[4] = {0}; - ulong freq = 0; ulong speed = 0; - memory_data[0] = cpu_to_be32 (bd->bi_memstart); - memory_data[1] = cpu_to_be32 (bd->bi_memsize); - - nodeoffset = fdt_path_offset (blob, "/memory"); - if (nodeoffset >= 0) { - ret = fdt_setprop (blob, nodeoffset, "reg", memory_data, - sizeof(memory_data)); - if (ret < 0) - printf ("ft_blob_update): cannot set /memory/reg " - "property err:%s\n", fdt_strerror (ret)); - } else { - /* memory node is required in dts */ - printf ("ft_blob_update(): cannot find /memory node " - "err:%s\n", fdt_strerror(nodeoffset)); - } /* update Flash addr, size */ flash_data[2] = cpu_to_be32 (CONFIG_SYS_FLASH_BASE); flash_data[3] = cpu_to_be32 (CONFIG_SYS_FLASH_SIZE); @@ -343,41 +312,11 @@ void ft_blob_update (void *blob, bd_t *bd) printf ("ft_blob_update(): cannot find /localbus node " "err:%s\n", fdt_strerror (nodeoffset)); } - /* MAC Adresse */ - nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet"); - if (nodeoffset >= 0) { - uchar ethaddr[6]; - eth_getenv_enetaddr("ethaddr", ethaddr); - ret = fdt_setprop (blob, nodeoffset, "mac-address", ethaddr, - sizeof (uchar) * 6); - if (ret < 0) - printf ("ft_blob_update): cannot set /soc/cpm/ethernet/mac-address " - "property err:%s\n", fdt_strerror (ret)); - } else { - /* memory node is required in dts */ - printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node " - "err:%s\n", fdt_strerror (nodeoffset)); - } - - /* brg clock */ - nodeoffset = fdt_path_offset (blob, "/soc/cpm/brg"); - if (nodeoffset >= 0) { - freq = cpu_to_be32 (bd->bi_brgfreq); - ret = fdt_setprop (blob, nodeoffset, "clock-frequency", &freq, - sizeof (unsigned long)); - if (ret < 0) - printf ("ft_blob_update): cannot set /soc/cpm/brg/clock-frequency " - "property err:%s\n", fdt_strerror (ret)); - } else { - /* memory node is required in dts */ - printf ("ft_blob_update(): cannot find /soc/cpm/brg/clock-frequency node " - "err:%s\n", fdt_strerror (nodeoffset)); - } /* baudrate */ nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial"); if (nodeoffset >= 0) { - speed = cpu_to_be32 (bd->bi_baudrate); + speed = cpu_to_be32 (gd->baudrate); ret = fdt_setprop (blob, nodeoffset, "current-speed", &speed, sizeof (unsigned long)); if (ret < 0)