#
8311ac5f |
|
02-Mar-2023 |
Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
cmd: introduce 'write' command It's almost no extra code to hook up a buddy to the 'read' command. In fact, since the command is passed its own 'struct cmd_tbl', we can use the exact same callback, and let it figure out for itself whether it was invoked as "read" or "write". Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
#
fca7db5b |
|
02-Mar-2023 |
Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing Use the helper part_get_info_by_dev_and_name_or_num() for parsing a dev[:part] string and obtaining the partition info in one go, instead of open-coding all that. As a bonus, this will automatically allow using the dev#partname syntax as well, for accessing raw partitions by name. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
#
e141075f |
|
30-Jul-2022 |
Simon Glass <sjg@chromium.org> |
dm: core: Support sandbox with read interface Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7e5f460e |
|
24-Jul-2021 |
Simon Glass <sjg@chromium.org> |
global: Convert simple_strtoul() with hex to hextoul() It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
0528979f |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
part: Drop disk_partition_t typedef We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d03618d5 |
|
14-Aug-2017 |
Tom Rini <trini@konsulko.com> |
cmd/read.c: Fix checking blk_dread return value The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> |
#
b75dfd2d |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Convert CMD_READ to Kconfig Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
2a981dc2 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
3e8bd469 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
db1d9e78 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Rename get_dev() to blk_get_dev() The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
4101f687 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
2e192b24 |
|
17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> |
#
e141075f |
|
30-Jul-2022 |
Simon Glass <sjg@chromium.org> |
dm: core: Support sandbox with read interface Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7e5f460e |
|
24-Jul-2021 |
Simon Glass <sjg@chromium.org> |
global: Convert simple_strtoul() with hex to hextoul() It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
0528979f |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
part: Drop disk_partition_t typedef We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d03618d5 |
|
14-Aug-2017 |
Tom Rini <trini@konsulko.com> |
cmd/read.c: Fix checking blk_dread return value The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> |
#
b75dfd2d |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Convert CMD_READ to Kconfig Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
2a981dc2 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
3e8bd469 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
db1d9e78 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Rename get_dev() to blk_get_dev() The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
4101f687 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
2e192b24 |
|
17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> |
#
7e5f460e |
|
24-Jul-2021 |
Simon Glass <sjg@chromium.org> |
global: Convert simple_strtoul() with hex to hextoul() It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
0528979f |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
part: Drop disk_partition_t typedef We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d03618d5 |
|
14-Aug-2017 |
Tom Rini <trini@konsulko.com> |
cmd/read.c: Fix checking blk_dread return value The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> |
#
b75dfd2d |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Convert CMD_READ to Kconfig Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
2a981dc2 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
3e8bd469 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
db1d9e78 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Rename get_dev() to blk_get_dev() The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
4101f687 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
2e192b24 |
|
17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
0528979f |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
part: Drop disk_partition_t typedef We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d03618d5 |
|
14-Aug-2017 |
Tom Rini <trini@konsulko.com> |
cmd/read.c: Fix checking blk_dread return value The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> |
#
b75dfd2d |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Convert CMD_READ to Kconfig Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
2a981dc2 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
3e8bd469 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
db1d9e78 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Rename get_dev() to blk_get_dev() The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
4101f687 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> |
#
2e192b24 |
|
17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> |
#
d03618d5 |
|
14-Aug-2017 |
Tom Rini <trini@konsulko.com> |
cmd/read.c: Fix checking blk_dread return value The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
|
#
b75dfd2d |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Convert CMD_READ to Kconfig Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
#
2a981dc2 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
|
#
3e8bd469 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
|
#
db1d9e78 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Rename get_dev() to blk_get_dev() The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
|
#
4101f687 |
|
29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
|
#
2e192b24 |
|
17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
|