History log of /u-boot/cmd/host.c
Revision Date Author Comments
# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 256f6da8 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 8897faba 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

blk: sandbox: Support binding a device with a given logical block size

Allow optionally set the logical block size of the host device to
bind in the "host bind" command. If not given, defaults to 512.

Signed-off-by: Bin Meng <bmeng@tinylab.org>


# 77ca9d74 26-Sep-2023 Bin Meng <bmeng@tinylab.org>

cmd: host: Mandate the filename parameter in the 'bind' command

At present the host bind command does not require filename to be
provided. When it is not given NULL is passed to the host device
driver, which ends up failure afterwards.

Change to mandate the filename so that it is useful.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 95201811 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Switch over to using the new host uclass

Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ff1f0e41 29-Oct-2022 Simon Glass <sjg@chromium.org>

dm: sandbox: Drop non-BLK code from host implementation

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32c8566f 24-Nov-2021 Simon Glass <sjg@chromium.org>

sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1758551e 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 803e9c1c 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Update do_host_bind() argument counting

Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1503c2c7 14-Mar-2021 Simon Glass <sjg@chromium.org>

sandbox: Disintangle declarations in do_host_bind()

This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# db4ec426 24-Jul-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

cmd: host: return value of do_host_bind()

When trying to bind to a non-existent file the following output is
displayed:

=> host bind 0 non_existent
Failed to access host backing file 'non_existent'
exit not allowed from main input shell.

The last line is quite unexpected and due to an incorrect return value.

If do_host_bind() fails, return CMD_RET_FAILURE (= 1).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

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>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 5bac9c53 22-Aug-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6d07d63d 15-Nov-2018 Simon Glass <sjg@chromium.org>

sandbox: Drop the deprecated 'sb' command

The old 'sb' command was deprecated in 2015 and replaced with 'host'.
Remove the remaining users and the command, so that the name is available
for other purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 6baa692f 19-Jan-2017 Sébastien Szymanski <sebastien.szymanski@armadeus.com>

cmd/host: add missing \n in help text

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>


# 1221ce45 20-Sep-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: replace #include <asm/errno.h> with <linux/errno.h>

Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content. (both just wrap <asm-generic/errno.h>)

Replace all include directives for <asm/errno.h> with <linux/errno.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini <trini@konsulko.com>


# 49afb379 11-Aug-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

sandbox: Add "host size" hostfs command for fs test

This complements the size/fatsize/ext4size commands added in
commit cf6598193aed5de8855eaf70c1994f2bc437255a
load, save and ls are already implemented for hostfs, now tests can
cover the same operations on hostfs and emulated block devices.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>


# 40fd0508 29-Feb-2016 Simon Glass <sjg@chromium.org>

dm: sandbox: Add driver-model block-device support for sandbox

Update the host driver to support driver model for block devices. A future
commit will remove the old code, but for now it is useful to be able to use
it both with and without CONFIG_BLK.

Signed-off-by: Simon Glass <sjg@chromium.org>
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>