X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fgardena%2Fsmart-gateway-mt7688%2Fboard.c;h=768e7acc35afeae1dd6c0f2293418986b828f260;hb=09140113108541b95d340f3c7b6ee597d31ccc73;hp=6e11077977a3d05555e391b375937905905b7446;hpb=daec1fd482b5ea735d70676a1909aec4355bbf86;p=oweals%2Fu-boot.git diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 6e11077977..768e7acc35 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -4,11 +4,17 @@ */ #include -#include +#include +#include +#include +#include +#include #include +#include #include #include #include +#include #include #include #include @@ -17,7 +23,7 @@ #define FACTORY_DATA_OFFS 0xc0000 #define FACTORY_DATA_SECT_SIZE 0x10000 -#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE_REDUND) > FACTORY_DATA_OFFS) +#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE) > FACTORY_DATA_OFFS) #error "U-Boot image with environment too big (overlapping with factory-data)!" #endif #define FACTORY_DATA_USER_OFFS 0x140 @@ -201,7 +207,7 @@ static void copy_or_generate_uuid(char *fd_ptr, const char *env_var_name) * Helper function to provide some sane factory-data values for testing * purpose, when these values are not programmed correctly */ -int do_fd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_fd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct factory_data_values *fd; struct spi_flash *sf; @@ -291,8 +297,10 @@ err_free: return ret; } +#ifndef CONFIG_SPL_BUILD U_BOOT_CMD( fd_write, 1, 0, do_fd_write, "Write test factory-data values to SPI NOR", "\n" ); +#endif