X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Ffreescale%2Fbsc9131rdb%2Fbsc9131rdb.c;h=9d9c83f7167e8bca4cafef6bc11dc24e13216cbf;hb=2702646bc083c7916aedc8c5eef81948c5c3864f;hp=2e0e55f47b6cfc5018f6247d377a0042d69e375c;hpb=8246ff864de38935ff34108856a37a2caf6cbefc;p=oweals%2Fu-boot.git diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c index 2e0e55f47b..9d9c83f716 100644 --- a/board/freescale/bsc9131rdb/bsc9131rdb.c +++ b/board/freescale/bsc9131rdb/bsc9131rdb.c @@ -1,23 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2011-2012 Freescale Semiconductor, Inc. - * - * 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 */ #include @@ -27,10 +10,13 @@ #include #include #include -#include +#include #include #include #include +#include +#include +#include #include @@ -59,25 +45,35 @@ int checkboard(void) { struct cpu_type *cpu; - cpu = gd->cpu; + cpu = gd->arch.cpu; printf("Board: %sRDB\n", cpu->name); return 0; } #if defined(CONFIG_OF_BOARD_SETUP) -void ft_board_setup(void *blob, bd_t *bd) +#ifdef CONFIG_FDT_FIXUP_PARTITIONS +static const struct node_info nodes[] = { + { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, +}; +#endif +int ft_board_setup(void *blob, bd_t *bd) { phys_addr_t base; phys_size_t size; ft_cpu_setup(blob, bd); - base = getenv_bootm_low(); - size = getenv_bootm_size(); + base = env_get_bootm_low(); + size = env_get_bootm_size(); fdt_fixup_memory(blob, (u64)base, (u64)size); +#ifdef CONFIG_FDT_FIXUP_PARTITIONS + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); +#endif - fdt_fixup_dr_usb(blob, bd); + fsl_fdt_fixup_dr_usb(blob, bd); + + return 0; } #endif