From dafd97ff70eaf191285fb1e4580c84b6e63c1e2b Mon Sep 17 00:00:00 2001 From: mingming lee Date: Thu, 16 Jan 2020 16:11:39 +0800 Subject: configs: mt8518: set global variables for fastboot set common fastboot variables for mt8518 Signed-off-by: mingming lee --- include/configs/mt8518.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/mt8518.h b/include/configs/mt8518.h index 514722be99..276fbc285f 100644 --- a/include/configs/mt8518.h +++ b/include/configs/mt8518.h @@ -11,7 +11,6 @@ #include -/* Machine ID */ #define CONFIG_SYS_NONCACHED_MEMORY SZ_1M #define CONFIG_CPU_ARMV8 @@ -54,10 +53,15 @@ #define ENV_BOOT_CMD \ "mtk_boot=run boot_rd_img;bootm;\0" +#define ENV_FASTBOOT \ + "serial#=1234567890ABCDEF\0" \ + "board=mt8518\0" + #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0x6c000000\0" \ ENV_DEVICE_SETTINGS \ ENV_BOOT_READ_IMAGE \ + ENV_FASTBOOT \ ENV_BOOT_CMD \ "bootcmd=run mtk_boot;\0" \ -- cgit From 1526bcce0f7285087621e16e6720636d01839da8 Mon Sep 17 00:00:00 2001 From: Angelo Durgehello Date: Tue, 21 Jan 2020 10:37:27 +0100 Subject: common: add blkcache init On m68k, block_cache list is relocated, but next and prev list pointers are not adjusted to the relocated struct list_head address, so the first iteration over the block_cache list hangs. This patch initializes the block_cache list after relocation. Signed-off-by: Angelo Durgehello Reviewed-by: Eric Nelson --- include/blk.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/blk.h b/include/blk.h index d0c033aece..65db69f5d9 100644 --- a/include/blk.h +++ b/include/blk.h @@ -113,6 +113,12 @@ struct blk_desc { (PAD_SIZE(size, blk_desc->blksz)) #if CONFIG_IS_ENABLED(BLOCK_CACHE) + +/** + * blkcache_init() - initialize the block cache list pointers + */ +int blkcache_init(void); + /** * blkcache_read() - attempt to read a set of blocks from cache * -- cgit From 50fe8df2c2cb863e0ab7d4c1240f2216ba184922 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Wed, 22 Jan 2020 16:59:55 -0700 Subject: common: blk: fix comment about blkcache_read return value The blkcache_read() routine returns 1 (true) to indicate that a block was found in the cache and returned, or 0 if not. Signed-off-by: Eric Nelson --- include/blk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/blk.h b/include/blk.h index 65db69f5d9..6f541bb2ba 100644 --- a/include/blk.h +++ b/include/blk.h @@ -129,7 +129,7 @@ int blkcache_init(void); * @param blksz - size in bytes of each block * @param buf - buffer to contain cached data * - * @return - '1' if block returned from cache, '0' otherwise. + * @return - 1 if block returned from cache, 0 otherwise. */ int blkcache_read(int iftype, int dev, lbaint_t start, lbaint_t blkcnt, -- cgit From 683b7c2a170a71bded99bb9e7dfd26372427ca1c Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 24 Jan 2020 13:45:56 +0100 Subject: mtd: add prototypes for weak function This patch adds a prototype for the weak function board_mtdparts_default(). It solves one warning when compiling with W=1 on stm32mp1 board: board/st/stm32mp1/stm32mp1.c: warning: no previous prototype for 'board_mtdparts_default' [-Wmissing-prototypes] void board_mtdparts_default(const char **mtdids, const char **mtdparts) ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrick Delaunay --- include/mtd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/mtd.h b/include/mtd.h index 65fcd3c700..b0f8693386 100644 --- a/include/mtd.h +++ b/include/mtd.h @@ -11,4 +11,6 @@ int mtd_probe(struct udevice *dev); int mtd_probe_devices(void); +void board_mtdparts_default(const char **mtdids, const char **mtdparts); + #endif /* _MTD_H_ */ -- cgit