X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fublimage.h;h=65d6aa1ff07bc2bdb11f0bad3a18e65084b31198;hb=fe6ef1e9bacac98747e8b88d6a7f786db511a8d6;hp=c9266890cede13c7d591aacf70dc3ac7d8329d6d;hpb=9023ae305919d0aecb4a22726b9d08c6b08189d7;p=u-boot diff --git a/tools/ublimage.h b/tools/ublimage.h index c9266890ce..65d6aa1ff0 100644 --- a/tools/ublimage.h +++ b/tools/ublimage.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2011 * Heiko Schocher, DENX Software Engineering, hs@denx.de. @@ -5,35 +6,11 @@ * Vased on: * (C) Copyright 2009 * Stefano Babic, DENX Software Engineering, sbabic@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 */ #ifndef _UBLIMAGE_H_ #define _UBLIMAGE_H_ -#include - -#if !defined(CONFIG_SYS_UBL_BLOCK) -#define CONFIG_SYS_UBL_BLOCK 512 -#endif - enum ublimage_cmd { CMD_INVALID, CMD_BOOT_MODE, @@ -71,6 +48,9 @@ enum ublimage_fld_types { /* Define max UBL image size */ #define UBL_IMAGE_SIZE (0x00003800u) +/* one NAND block */ +#define UBL_BLOCK_SIZE 2048 + /* from sprufg5a.pdf Table 109 */ struct ubl_header { uint32_t magic; /* Magic Number, see UBL_* defines */ @@ -97,7 +77,7 @@ struct ubl_header { * Magic Number indicates fast EMIF boot). */ /* to fit in one nand block */ - unsigned char res[CONFIG_SYS_UBL_BLOCK - 8 * 4]; + unsigned char res[UBL_BLOCK_SIZE - 8 * 4]; }; #endif /* _UBLIMAGE_H_ */