From 7667bdeb0e6f63b4df9a253c85ea08d1625d6e63 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 8 Nov 2023 12:51:09 -0500 Subject: fs: ext4: Remove unused parameter from ext4_mount The part_length parameter is not used. Remove it. Signed-off-by: Sean Anderson --- include/ext4fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ext4fs.h b/include/ext4fs.h index dd66d27f776..d96edfd0576 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -147,7 +147,7 @@ int ext4fs_create_link(const char *target, const char *fname); struct ext_filesystem *get_fs(void); int ext4fs_open(const char *filename, loff_t *len); int ext4fs_read(char *buf, loff_t offset, loff_t len, loff_t *actread); -int ext4fs_mount(unsigned part_length); +int ext4fs_mount(void); void ext4fs_close(void); void ext4fs_reinit_global(void); int ext4fs_ls(const char *dirname); -- cgit v1.2.3 From d7ce04c7f4cbae9608287ebd810a411944efff9a Mon Sep 17 00:00:00 2001 From: Igor Prusov Date: Thu, 9 Nov 2023 20:10:02 +0300 Subject: linux/time.h: Add Linux time conversion defines Currently there are no defines for time conversion in time.h, which leads to drivers declaring those locally or not using defines at all, so add them from Linux. Signed-off-by: Igor Prusov Reviewed-by: Simon Glass --- include/linux/time.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/linux/time.h b/include/linux/time.h index 14ff5b6f481..14a144d9c9c 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -11,6 +11,15 @@ #define _REENT_ONLY +#define MSEC_PER_SEC 1000L +#define USEC_PER_MSEC 1000L +#define NSEC_PER_USEC 1000L +#define NSEC_PER_MSEC 1000000L +#define USEC_PER_SEC 1000000L +#define NSEC_PER_SEC 1000000000L +#define PSEC_PER_SEC 1000000000000LL +#define FSEC_PER_SEC 1000000000000000LL + #define SECSPERMIN 60L #define MINSPERHOUR 60L #define HOURSPERDAY 24L -- cgit v1.2.3 From 66a3618b9afc564ca073446a50cd6a139b741f51 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Thu, 9 Nov 2023 23:34:35 +0100 Subject: poplar: provide more space for kernel image Adjust mem layout, providing more space for linux kernel image. This fixes the problem: ERROR: FDT image overlaps OS image (OS=0x30000000..0x32580000) Signed-off-by: Igor Opaniuk Reviewed-by: Sam Protsenko --- include/configs/poplar.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/poplar.h b/include/configs/poplar.h index 6e8adf91877..629b335f5d1 100644 --- a/include/configs/poplar.h +++ b/include/configs/poplar.h @@ -37,11 +37,11 @@ "env_mmc_blknum=0xf80\0" \ "env_mmc_nblks=0x80\0" \ "kernel_addr_r=0x30000000\0" \ - "pxefile_addr_r=0x32000000\0" \ - "scriptaddr=0x32000000\0" \ - "fdt_addr_r=0x32200000\0" \ + "pxefile_addr_r=0x33000000\0" \ + "scriptaddr=0x33000000\0" \ + "fdt_addr_r=0x33200000\0" \ "fdtfile=hisilicon/hi3798cv200-poplar.dtb\0" \ - "ramdisk_addr_r=0x32400000\0" \ + "ramdisk_addr_r=0x33400000\0" \ BOOTENV #endif /* _POPLAR_H_ */ -- cgit v1.2.3 From a654369b4923781059032b7c7ba68f4c5195d93f Mon Sep 17 00:00:00 2001 From: Dmitrii Merkurev Date: Fri, 10 Nov 2023 05:59:54 +0000 Subject: cmd: bcb: support various block device interfaces for BCB command Currently BCB command-line, C APIs and implementation only support MMC interface. Extend it to allow various block device interfaces. Signed-off-by: Dmitrii Merkurev Cc: Eugeniu Rosca Cc: Ying-Chun Liu (PaulLiu) Cc: Simon Glass Cc: Mattijs Korpershoek Cc: Sean Anderson Cc: Cody Schuffelen Tested-by: Mattijs Korpershoek # on vim3 Reviewed-by: Mattijs Korpershoek --- include/bcb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/bcb.h b/include/bcb.h index 5edb17aa47d..a6326523c47 100644 --- a/include/bcb.h +++ b/include/bcb.h @@ -9,10 +9,11 @@ #define __BCB_H__ #if IS_ENABLED(CONFIG_CMD_BCB) -int bcb_write_reboot_reason(int devnum, char *partp, const char *reasonp); +int bcb_write_reboot_reason(const char *iface, int devnum, char *partp, const char *reasonp); #else #include -static inline int bcb_write_reboot_reason(int devnum, char *partp, const char *reasonp) +static inline int bcb_write_reboot_reason(const char *iface, int devnum, + char *partp, const char *reasonp) { return -EOPNOTSUPP; } -- cgit v1.2.3 From dfeb4f0d79351dc0256b45c7a9f26c752c4e0e09 Mon Sep 17 00:00:00 2001 From: Dmitrii Merkurev Date: Fri, 10 Nov 2023 05:59:55 +0000 Subject: cmd: bcb: extend BCB C API to allow read/write the fields Currently BCB C API only allows to modify 'command' BCB field. Extend it so that we can also read and modify all the available BCB fields (command, status, recovery, stage). Co-developed-by: Cody Schuffelen Signed-off-by: Cody Schuffelen Signed-off-by: Dmitrii Merkurev Cc: Eugeniu Rosca Cc: Ying-Chun Liu (PaulLiu) Cc: Simon Glass Cc: Mattijs Korpershoek Cc: Sean Anderson Cc: Cody Schuffelen Tested-by: Mattijs Korpershoek # on vim3 Reviewed-by: Mattijs Korpershoek --- include/bcb.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/bcb.h b/include/bcb.h index a6326523c47..1941d8c28b4 100644 --- a/include/bcb.h +++ b/include/bcb.h @@ -8,15 +8,69 @@ #ifndef __BCB_H__ #define __BCB_H__ +#include + +enum bcb_field { + BCB_FIELD_COMMAND, + BCB_FIELD_STATUS, + BCB_FIELD_RECOVERY, + BCB_FIELD_STAGE +}; + #if IS_ENABLED(CONFIG_CMD_BCB) -int bcb_write_reboot_reason(const char *iface, int devnum, char *partp, const char *reasonp); + +int bcb_find_partition_and_load(const char *iface, + int devnum, char *partp); +int bcb_load(struct blk_desc *block_description, + struct disk_partition *disk_partition); +int bcb_set(enum bcb_field field, const char *value); + +/** + * bcb_get() - get the field value. + * @field: field to get + * @value_out: buffer to copy bcb field value to + * @value_size: buffer size to avoid overflow in case + * value_out is smaller then the field value + */ +int bcb_get(enum bcb_field field, char *value_out, size_t value_size); + +int bcb_store(void); +void bcb_reset(void); + #else + #include -static inline int bcb_write_reboot_reason(const char *iface, int devnum, - char *partp, const char *reasonp) + +static inline int bcb_load(struct blk_desc *block_description, + struct disk_partition *disk_partition) +{ + return -EOPNOTSUPP; +} + +static inline int bcb_find_partition_and_load(const char *iface, + int devnum, char *partp) +{ + return -EOPNOTSUPP; +} + +static inline int bcb_set(enum bcb_field field, const char *value) +{ + return -EOPNOTSUPP; +} + +static inline int bcb_get(enum bcb_field field, char *value_out) { return -EOPNOTSUPP; } + +static inline int bcb_store(void) +{ + return -EOPNOTSUPP; +} + +static inline void bcb_reset(void) +{ +} #endif #endif /* __BCB_H__ */ -- cgit v1.2.3